# Decorator Consumes
Decorator swagger classDecorator operationModule | import { Consumes } from "@tsed/schema" |
---|---|
Source | /packages/schema/src/decorators/operations/consumes.ts |
# Overview
function Consumes(...consumes: string[]): (...args: any[]) => any;
# Description
Add consumes metadata on the decorated element.
# Examples
class Model {
@Consumes("application/x-www-form-urlencoded")
id: string;
}
1
2
3
4
2
3
4
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