Skip to content

Add OpenAPI Documentation using Swagger and Controller Annotations #48

Description

@bzmp125

I'd like to propose adding OpenAPI documentation using Swagger to this project. Swagger provides a standardized way to describe RESTful APIs, making it easier for developers to understand and interact with the nestjs-recipe API.

I propose adding Swagger documentation to the project by utilizing the NestJS @nestjs/swagger package. This will include:

  1. Adding the @nestjs/swagger package as a dependency and adding the Swagger configuration.
  2. Integrating Swagger middleware to generate and serve the OpenAPI documentation.
  3. Annotating controllers and their methods with Swagger decorators (@apitags, @apioperation, @ApiParam, @ApiBody, @apiresponse, etc.) to provide detailed information about API endpoints, parameters, request/response bodies, and expected responses.

I believe this addition, combined with detailed controller annotations, will significantly enhance the developer experience for users of the nestjs-recipe library by providing clear and comprehensive documentation within the code itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions