fix(openapi): declare in:path parameters for every {templated} path segment - #5664
Conversation
…egment
buildOpenApiSpec() had 27 registerPath() calls whose path templates
referenced {owner}/{repo}/{number}/{id}/{login} without a matching
request.params schema, so the generated spec never emitted the parameters
those operations need. Cloudflare's Schema Validation flagged this as
warning 30046 (path parameter expected but not found) on import against
https://loopover.ai/openapi.json.
Adds a regression test asserting every templated path segment across all
97 paths has a declared in:path parameter.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 1b492de | Commit Preview URL Branch Preview URL |
Jul 13 2026, 10:47 PM |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-14 01:44:10 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 4 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5664 +/- ##
=======================================
Coverage 95.04% 95.04%
=======================================
Files 577 577
Lines 45987 45987
Branches 14708 14708
=======================================
Hits 43707 43707
Misses 1527 1527
Partials 753 753
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…hema Validation The full public openapi.json (~480KB pretty-printed, full response bodies + component schemas + prose) exceeds Cloudflare's Free-plan zone schema-storage limit of 204800 bytes (confirmed via a real "Zone schema storage limit ... exceeded" (code 20400) upload rejection). Schema Validation only inspects incoming requests, never responses, so `npm run cloudflare:schema --silent > cloudflare-schema.json` derives a compact (~24KB) variant: strips response bodies/prose descriptions and prunes components.schemas down to whatever's still $ref-reachable (nothing, today, since every request body here is inline Zod rather than a named ref) — well under budget with real headroom as the API keeps growing.


Summary
buildOpenApiSpec()had 27registerPath()calls whose path templates referenced{owner}/{repo}/{number}/{id}/{login}without a matchingrequest.paramsschema, so the generated spec never declared formalin: pathparameters for those operations.https://loopover.ai/openapi.json— it flagged warning 30046 ("path parameter expected but not found") grouped across the same 27 operations, auto-fixing them client-side but leaving our own source spec incomplete.{templated}path segment across all 97 generated paths has a declaredin: pathparameter (verified it fails without the fix).npm run cloudflare:schema(scripts/write-cloudflare-schema.ts): the full publicopenapi.json(~480KB, pretty-printed, full response bodies/component schemas/prose) exceeds Cloudflare's Free-plan zone schema-storage limit (204800 bytes — confirmed via a real "Zone schema storage limit ... exceeded" upload rejection once the path-param warnings above were fixed). Schema Validation only inspects incoming requests, never responses, so this derives a compact (~24KB) variant with the response/prose stripped and now-unreferenced component schemas pruned by reachability.Test plan
npm run test:ci— full local gate, clean (16043 tests passed, 0 failed)npm run ui:openapi:check— regenerated spec matches committedopenapi.jsontest/unit/openapi.test.tsverified to fail without the fix, pass with ittest/unit/write-cloudflare-schema.test.tspins the trimmed output under budget, spec-valid, path-params intact, and components.schemas pruned by real $ref reachability