shift requests swagger documentation - Aswin 225287418 - #486
Open
mraswinsoman wants to merge 1 commit into
Open
Conversation
LoopyB
reviewed
Aug 9, 2026
LoopyB
left a comment
Collaborator
There was a problem hiding this comment.
Thanks Aswin - I've reviewed this against the current routes, roles and controller/service behaviour and the Swagger documentation itself looks sound. All four endpoints are covered and the important limitation that approval/rejection records the decision only rather than changing shift assignment is correctly documented.
Before we wrap this one up, could you please:
- add the requested Swagger UI screenshot(s) and make two small documentation tidy-ups
- update the PR description so it doesn't state that 409 is currently returned (the existing API uses 400 for those cases)
- use a longer-lived future date for the LEAVE example so it doesn't become stale.
Lint, formatting and Swagger generation have all checked out, so I don't see any blocking implementation issues here. Nice work getting your first PR through - just a few small changes and I can merge.
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.
Shift Request Swagger/OpenAPI Documentation
Summary
This PR adds Swagger/OpenAPI documentation for the four /api/v1/shift-requests endpoints introduced in PR #415.
The documentation has been written to reflect the current route and controller behavior without making changes to the existing endpoint functionality.
Changes
Documented all four Shift Request endpoints.
Added authentication and allowed role information.
Documented relevant path and query parameters.
Added request body schemas.
Added example payloads for both SWAP and LEAVE requests.
Documented success responses and relevant 400, 401, 403, 404, and 409 error responses.
Verified the documentation against the existing routes and controller behavior.
Clarified that approval currently records the decision only and does not reassign the associated shift.
Scope
This PR is documentation only. No Shift Request endpoint behavior or business logic has been modified in this update.
Testing / Verification
Verified all four endpoints in Swagger UI.
Checked request and response documentation against the current implementation.
Verified SWAP and LEAVE examples.
Ran the available lint/format checks.