Reputation: 1350
I would like to add a description field to my dto (also to satisfy no_schema_description
in OpenAPI linting), but find no way to do so. Which decorator to use? At the point of defining the dto or in the response?
Update (clarify): I am looking to define a description for the whole schema, not for single properties.
Upvotes: 8
Views: 3924
Reputation: 3007
You can do that simply by using ApiProperty()
:
@ApiProperty({
description: 'The age of a cat',
})
age: number;
I recommend you to check the official doc openapi/types-and-parameters
Upvotes: 0