-
Notifications
You must be signed in to change notification settings - Fork 191
Description
Description
The Swagger documentation for the waitlist module does not include proper authorization details for the createWaitlistDocs
function, and that for the Newsletter Subscription does not include proper response documentation.
Current Documentation
The createWaitlistDocs
function does not include any authorization details, which may lead to confusion about the required authorization for this endpoint, and the Newsletter Subscription does not include documentation for various response.
Proposed Changes
- Add the
ApiBearerAuth
decorator to thecreateWaitlistDocs
function to indicate that the endpoint requires authorization. - Enhance the
createWaitlistDocs
andgetAllWaitlistDocs
functions to include detailed examples for each response status. - Update the ErrorResponseDto class to include examples for different error scenarios.
- Updated
newsletter-subscription.controller.ts
to usenewsletter-subscription-swagger.docs.ts
for documentation. - Added various dto files for error responses in the the documentation.
Steps to Reproduce
- Open the Swagger UI for the waitlist module.
- Navigate to the endpoint for creating a new waitlist entry.
- Observe that there is no authorization information provided.
Motivation
The getAllWaitlistDocs
function already includes the ApiBearerAuth
decorator, so the createWaitlistDocs
function should be updated to match this behavior. Additionally, providing detailed examples for each response status will improve the clarity and usability of the Swagger documentation for both waitlist and newsletter subscription modules.
Acceptance Criteria
- The
createWaitlistDocs
function should include anApiBearerAuth
decorator to indicate that the endpoint requires authorization. - The
createWaitlistDocs
andgetAllWaitlistDocs
functions should include detailed examples for each response status. - Separate DTOs for each error type should be created to include examples for different error scenarios.
- Both
waitlist
andnewsletter subscription
should have proper documentation for various response type.