Repository navigation
fix(PRD-59): align Credit-Risk / Sanctions / Interest-Rates specs with live API - #11
Merged
Merged
Conversation
otpixto7
force-pushed
the
PRD-59_openapi_followup
branch
from
July 14, 2026 15:08
463fc69 to
d6f3412
Compare
Follow-up to #9 (Credit & Sovereign Risk / Sanctions / Interest Rates). Corrects spec accuracy against the live API: - page[limit]: add maximum 100 + default 20 on the 7 credit-risk and 2 interest-rates endpoints (the API caps at 100 and defaults to 20; sanctions already documented this) - hqm-yields filter[tenor] and filter[type]: enum/integer -> string; both accept a comma-separated list (e.g. "2,5,10", "par,spot"), which the scalar types could not express - add 422 (validation error) response to all 14 endpoints - sanctions entities/vessels: add missing id field - sanctions entities: mark country/remarks/listed_date nullable (the API returns null for these) - cds-market/aggregates: document filter[value] and filter[region] - sanctions/vessels q: add minLength 2 (parity with entities) - sanctions programs/sources: drop non-functional pagination params - credit-risk sovereign: broaden country param description (name or ISO3) The meta/MetaPagination mismatch and string maxLength limits are intentionally left out (shared/pre-existing; tracked separately). Verified against prometheus-web dev. redocly lint + bundle pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
otpixto7
force-pushed
the
PRD-59_openapi_followup
branch
from
July 14, 2026 15:24
d6f3412 to
534ae7a
Compare
- .github/workflows/spec-check.yml: run redocly lint + bundle + convention checks on every pull_request (validation previously ran only on push to main during the docs deploy, so PRs weren't gated) - scripts/check-conventions.mjs: for the credit-risk / sanctions / interest-rates families, enforce that every operation documents 401/403/404/422/429 and that any page[limit] is bounded with maximum + default - package.json: add "check" and "test" scripts Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Follow-up to #9 — accuracy fixes for the three new API families (Credit & Sovereign Risk, Sanctions, Interest Rates) so the spec matches the live API. Part of PRD-59.
Changes
page[limit]now documentsmaximum: 100+default: 20on the 7 credit-risk and 2 interest-rates endpoints. The API enforces this; the sanctions endpoints already had it, the rest didn't.filter[tenor]andfilter[type](hqm-yields) —integer/enum→string. Both accept a comma-separated list (e.g.2,5,10,par,spot), which the scalar types couldn't express and which contradicted the Postman example.422on validation errors — bad enum,qunder 2 chars,limitover 100,fromafterto).id— added to the sanctions entities & vessels response schemas.country/remarks/listed_datemarked[string, 'null'](the API returnsnullfor these).filter[value]andfilter[region](accepted by the API, previously omitted).q— addedminLength: 2(parity with entities).page[offset]/page[limit]params.Deliberately excluded
meta/MetaPaginationmismatch — shared, pre-existing component; tracked separately.maxLengthlimits (the API caps most string filters at 255/100/etc.) — the spec has never documented these on any filter; adding them belongs in a separate spec-wide pass, not selectively.filter[currency]enum in reference-rates — deferred.Verification
Every change was re-checked against the request classes, controllers and tests on prometheus-web
dev, and independently reviewed (Codex + opencode) against the same.npm run validate(redocly lint) andnpm run build(bundle) both pass.🤖 Generated with Claude Code