Skip to content

[O2B-1623] Document the shift-data endpoint in the HTTP API documentation - #2269

Merged
graduta merged 3 commits into
mainfrom
feature/O2B-1623/docs-shift-data-endpoint
Oct 22, 2026
Merged

graduta merged 3 commits into
mainfrom
feature/O2B-1623/docs-shift-data-endpoint

Conversation

@graduta

@graduta graduta commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Part of a stack of PRs documenting the HTTP API (O2B-1623). The earlier PRs of the stack are merged: this one is rebased on main and regenerated with the current generator. The following PRs of the stack are rebased one by one, once the previous one is merged.

Notable changes for users:

  • The shift-data endpoints are now documented at /api-docs, with parameters, responses and curl examples:
    • GET /api/shift-data: data of the calling user's pending shift (issues, runs or environments depending on the shift type, and the information left by the previous shifter)

Notable changes for developers:

  • Checked the chain of the endpoint (router, controller, DTO, ShiftService and its small functions, tests): all files have their license header, no use case is involved, ShiftService is already built on small functions (no direct repository use), every function of the chain is used and the router references an existing handler. The only fix is the controller handler, which disabled a JSDoc rule instead of being documented.
  • createdAt / updatedAt are not removed: the shift itself has none, and the nested logs, runs and environments come from the shared adapters of those resources (the ECS report form reads environment.createdAt).
  • lib/server/api-docs/openapi.yaml is updated by hand, API.md and index.html are regenerated with npm run docs:api (separate commit).
  • Log, run and environment entities returned inside the shift data are left as free-form objects until the logs, runs and environments resources are documented.

Changes made to the database:

  • None

🤖 Generated with Claude Code

@graduta
graduta requested a review from isaachilly as a code owner October 20, 2026 13:01
@graduta
graduta added this pull request to stack #2265 October 20, 2026 13:01
@graduta graduta changed the title feature/O2B 1623/docs shift data endpoint [O2B-1623] Document the shift-data endpoint in the HTTP API documentation Oct 20, 2026
@graduta graduta added documentation Improvements or additions to documentation backend labels Oct 20, 2026
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.40%. Comparing base (56aac9e) to head (47cba75).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2269   +/-   ##
=======================================
  Coverage   46.40%   46.40%           
=======================================
  Files        1051     1051           
  Lines       17363    17363           
  Branches     3161     3161           
=======================================
  Hits         8057     8057           
  Misses       9306     9306           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@graduta
graduta removed this pull request from stack #2265 October 22, 2026 09:29
@graduta
graduta added this pull request to stack #2276 October 22, 2026 09:30
Base automatically changed from feature/O2B-1623/docs-ctp-trigger-counters-endpoint to main October 22, 2026 11:57
The handler documentation was replaced by a disabled JSDoc rule: it now describes its parameters and its result.
@graduta
graduta force-pushed the feature/O2B-1623/docs-shift-data-endpoint branch from 2157956 to 47cba75 Compare October 22, 2026 12:00
@graduta
graduta merged commit 63833ec into main Oct 22, 2026
26 checks passed
@graduta
graduta deleted the feature/O2B-1623/docs-shift-data-endpoint branch October 22, 2026 12:05
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

Development

Successfully merging this pull request may close these issues.

2 participants