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

[FEATURE]: Swagger Documentation #296

Closed
26 tasks done
dsousa12 opened this issue Jun 30, 2022 · 2 comments · Fixed by #371
Closed
26 tasks done

[FEATURE]: Swagger Documentation #296

dsousa12 opened this issue Jun 30, 2022 · 2 comments · Fixed by #371
Assignees
Labels
backend documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@dsousa12
Copy link
Contributor

dsousa12 commented Jun 30, 2022

Summary

Implementation of Swagger documentation.

Notes

  • Install swagger-ui-express and @nestjs/swagger;
  • Add configurations on main.ts;
    const config = new DocumentBuilder()
       .setTitle('SPLIT')
       .setVersion('0.0.1')
       .build();
    
     const document = SwaggerModule.createDocument(app, config);
    
     SwaggerModule.setup('swagger', app, document);
  • Add params, body and summary decorators to:
    • Auth Module
    • Azure Module
    • Boards Module
    • Cards Module
    • Comments Module
    • Teams Module
    • Users (only DTOs - don't have controller)
    • Votes Module
  • Set responses schemas and types:
    • Auth Module
    • Azure Module
    • Boards Module
    • Cards Module
    • Comments Module
    • Teams Module
    • Votes Module
  • Add tags
    • Authentication;
    • Boards;
    • Teams;
    • Votes;
    • Comments;
  • Default Errors Responses
    • 400 - Bad Request
    • 401 - Unauthorized
    • 403 - Forbidden
    • 404 - Not Found
    • 500 - Internal Server Error

Motivation

With Swagger the new members and frontend developers can see which endpoints exists on backend, can test that endpoints and see the possible responses/status code.

@dsousa12 dsousa12 added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 30, 2022
@dsousa12 dsousa12 modified the milestones: MVP, Full Version Jun 30, 2022
@dsousa12 dsousa12 self-assigned this Jun 30, 2022
@dsousa12 dsousa12 modified the milestones: Full Version, MVP Jun 30, 2022
@CatiaBarroco-xgeeks
Copy link
Contributor

for me it seems really good, I agree with this implementation

@dsousa12 dsousa12 moved this from To Do to In Progress in SPLIT • Backend Jul 3, 2022
@dsousa12 dsousa12 modified the milestones: MVP, Full Version Jul 4, 2022
@dsousa12 dsousa12 modified the milestones: MVP, Full Version Jul 19, 2022
@dsousa12
Copy link
Contributor Author

Note:

After MVP it's necessary refactoring all DTO's to have separated DTO's to creation methods (without _id).

@dsousa12 dsousa12 linked a pull request Jul 25, 2022 that will close this issue
@dsousa12 dsousa12 moved this from In Progress to Review in Progress in SPLIT • Backend Jul 25, 2022
Repository owner moved this from Review in Progress to Done in SPLIT • Backend Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants