docs: describe the real API instead of a fictional one - #807
Merged
Conversation
Fixes #805. docs/API.md documented endpoints that have never existed (GET /api/job/{name}, PUT /api/job/{name}, PATCH .../toggle, execution and scheduler-control routes, WebSocket events); openapi.yaml carried the same fiction plus /metrics, which the web server does not mount. Both files are rewritten from the route table in web/server.go and the verified handler shapes: the three job listings and their apiJob schema, /api/jobs/{name}/history, the POST mutations (run, enable, disable, create, update, delete incl. the 403 origin gate), the real login response (token + csrf_token + expires_in, cookie semantics, no refresh endpoint), /api/config with stripped job collections, and the root-level health endpoints. Default server address corrected to :8081. Assisted-by: claude-code:claude-fable-5 Agent-Session: https://claude.ai/code/session_01L7tF9XuJfAfFk4yuY5KfPK Agent-Host: 0493f0 Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
There was a problem hiding this comment.
Automated approval for maintainer PR
All automated quality gates passed. See SECURITY_CONTROLS.md for compensating controls.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #807 +/- ##
=======================================
Coverage 91.13% 91.13%
=======================================
Files 88 88
Lines 10681 10681
=======================================
Hits 9734 9734
Misses 946 946
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
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.



Fixes #805.
docs/API.mddocumented endpoints that have never existed (GET /api/job/{name},PUT /api/job/{name},PATCH …/toggle, execution and scheduler-control routes, WebSocket events), andopenapi.yamlcarried the same fiction plus/metrics, which the web server does not mount. Both files are rewritten from the route table inweb/server.goand the verified handler shapes: the three job listings with the realapiJobschema,/api/jobs/{name}/history, all POST mutations including the 403 origin gate on delete, the real login response and cookie semantics (no refresh endpoint exists),/api/configwith stripped job collections, and the root-level health endpoints. Default server address corrected to:8081.Documents current main only — nothing from the in-flight #789/#797 is included; both can now extend a spec that matches reality (as their reviews requested).
Assisted by claude-code:claude-fable-5 — Session