Question · NestJS course · Module 11: Swagger and OpenAPI
The @ApiProperty Decorator
What does the @ApiProperty() decorator do on a DTO class field?
Answer options
- Describes the field in the Swagger documentation with a description, type, and example
- Creates a column in the database
- Validates input data from a form
- Exports the field to a JSON file
You can check the correct answer by solving this task in the CodeWorlds game.