Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAPI Documentation using Swagger and Controller Annotations #48

Open
bzmp125 opened this issue Jan 15, 2025 · 0 comments
Open

Add OpenAPI Documentation using Swagger and Controller Annotations #48

bzmp125 opened this issue Jan 15, 2025 · 0 comments

Comments

@bzmp125
Copy link

bzmp125 commented Jan 15, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant