docs(openapi): document validate-linked-issue + check-before-start routes (#9304) - #9440
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Important 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏳ LoopOver is waiting…LoopOver has seen this pull request and is waiting on CI checks to finish before reviewing it. This comment will update once the review runs. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟨 Waiting |
faea18e to
75bbffd
Compare
|
This repository reviews pull requests one-shot: the PR must be correct as originally opened. Pushing an additional commit closes it automatically instead of restarting review — open a fresh pull request with every fix included. |
…utes Two live POST /v1/repos/:owner/:repo pre-work-check routes (validate-linked-issue, check-before-start) each already back an MCP tool with its own Zod shapes but were absent from the OpenAPI spec. Add ValidateLinkedIssue/CheckBeforeStart request+response schemas in schemas.ts (field-level parity with the MCP inputSchema/outputSchema), register both as components and registerPath entries in spec.ts (mirroring the gate-config/effective + evaluate-escalation patterns), and regenerate the committed apps/loopover-ui/public/openapi.json.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9440 +/- ##
===========================================
- Coverage 89.54% 75.69% -13.86%
===========================================
Files 843 277 -566
Lines 110011 58466 -51545
Branches 26184 6216 -19968
===========================================
- Hits 98511 44253 -54258
- Misses 10238 13942 +3704
+ Partials 1262 271 -991
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Problem
Closes #9304.
Two live
POST /v1/repos/:owner/:repo/*pre-work-check routes insrc/api/routes.tseach already have an MCP tool with its own Zod shapes insrc/mcp/server.ts, but neither appears insrc/openapi/spec.ts:POST …/validate-linked-issue→loopover_validate_linked_issue(validateLinkedIssueOutputSchema)POST …/check-before-start→loopover_check_before_start(checkBeforeStartOutputSchema)Fix
Mirrors the #6611 pattern for
gate-config/effective(and theevaluate-escalationPOST mirror):src/openapi/schemas.ts: addedValidateLinkedIssueRequestSchema/ValidateLinkedIssueResponseSchemaandCheckBeforeStartRequestSchema/CheckBeforeStartResponseSchema— field-level parity with the MCP tools'inputSchema/outputSchema(following the repo convention of representing shapes with basic Zod types, without the internal PREFLIGHT_LIMITS max constraints).src/openapi/spec.ts:registry.registerall four as components andregisterPathboth routes (params + request body + response, with 400/401/403).apps/loopover-ui/public/openapi.json— committed here;npm run ui:openapi:checkenforces it in CI.Verification
test/unit/openapi.test.tspasses;buildOpenApiSpec()includes both new paths; regeneration is byte-stable (100% patch coverage on the newschemas.ts/spec.tslines via the openapi test).