Skip to main content

Configure Swagger​

Use the standard Nest Swagger setup:
main.ts
The Swagger UI is then available at /api.

Customize generated operations​

Set shared tags at the endpoint level and operation-specific descriptions, tags, or Swagger operation options under one or many.
Operation IDs are derived from the plural DTO name, for example todoItemDTOs.queryMany and todoItemDTOs.createOne. Use dtoName to change that logical name and basePath to change only the URL path.

Schema accuracy​

Use @Field, @FilterableField, and @IDField on DTO properties so Swagger, transformation, and validation share the same metadata. When reflection cannot infer a nested or array type, pass a return type explicitly: