# Decorator In
Decorator swagger schema input operationModule | import { In } from "@tsed/schema" |
---|---|
Source | /packages/schema/src/decorators/operations/in.ts |
# Overview
function In(inType: JsonParameterTypes | string): InChainedDecorators;
# Description
Add a input parameter.
WARNING
Don't use decorator with Ts.ED application to decorate parameters. Use BodyParams , PathParams , etc... instead. But you can use this decorator on Method, to add extra in parameters like Authorization header.
@Controller("/")
class MyController {
@Get("/")
@In("header").Type(String).Name("Authorization").Required()
method() {
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
Other topics
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Seq
- OIDC
- Stripe
- Controllers
- Providers
- Model
- JsonMapper
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Exceptions
- Hooks
- Response Filter
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing