Ask Your Question

Revision history [back]

Swagger documents reusable enums in NestJS by including them in the schema definitions section of the Swagger documentation. The enum is listed as an object with the enum name, values, and description provided. The endpoint that uses the enum is then documented as accepting a parameter of the enum type. This provides clear documentation for developers who are using the API to understand the valid values for the enum and how to use them in their requests.