Skip to content

shift requests swagger documentation - Aswin 225287418 - #486

Open
mraswinsoman wants to merge 1 commit into
mainfrom
docs/shift-request-api-aswin
Open

shift requests swagger documentation - Aswin 225287418#486
mraswinsoman wants to merge 1 commit into
mainfrom
docs/shift-request-api-aswin

Conversation

@mraswinsoman

Copy link
Copy Markdown
Collaborator

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.

@LoopyB LoopyB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Successfully merging this pull request may close these issues.

3 participants