[LOCKLITE-114] Document the Next Auth API routes#70
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates business error code references throughout the codebase and adds comprehensive Swagger documentation for Next Auth API routes. The changes support better API documentation and refactor error handling to use consistent enum naming.
Key changes:
- Refactored business error code enum from
BusinessErrorCodeEnumDtotoBusinessErrorCodeEnumand updated all references - Added new DTO types for authentication-related API responses (session, providers, CSRF token, sign-in payload)
- Added comprehensive Swagger documentation for all Next Auth API endpoints
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/modules/shared/errors/business-error-code.enum.ts | Renamed enum from BusinessErrorCodeEnumDto to BusinessErrorCodeEnum |
| src/modules/shared/errors/business-error.ts | Updated import and type references to use the renamed enum |
| src/modules/shared/dto/output/errors/http.error.dto.ts | Updated import and type reference for consistency |
| src/modules/api/errors/business/vaults/*.error.ts | Updated imports and enum references in vault error classes |
| src/modules/shared/dto/output/body/*.dto.ts | Added new DTO types for auth API responses with Swagger documentation |
| src/modules/shared/dto/models/provider.model.dto.ts | Added provider model DTO with Swagger schema |
| src/modules/shared/dto/input/payloads/sign-in.payload.dto.ts | Added sign-in payload DTO with Swagger documentation |
| src/modules/shared/dto/input/payloads/create-vault.payload.dto.ts | Added password format specification to secret field |
| src/app/api/vaults/route.ts | Changed Swagger description to summary for better documentation |
| src/app/api/vaults/[id]/route.ts | Changed Swagger description to summary for consistency |
| src/app/api/auth/[...nextauth]/route.ts | Added comprehensive Swagger documentation for all Next Auth API endpoints |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.