Repository navigation
[v3-3-test] Keep OpenAPI error responses in sync with the statuses routes raise - #73968
Merged
Merged
Conversation
…pache#71647) * Keep OpenAPI error responses in sync with the statuses routes raise `create_openapi_http_exception_doc(...)` feeds the `responses=` block that the generated spec — and every client built from it — uses to model error responses, but nothing ties that list to the statuses a handler actually raises. The two drift apart silently, and the same drift has had to be found and patched by hand four times (apache#67570, apache#67571, apache#70992, apache#71011). A static check keeps them together, so the next divergence fails in CI instead of shipping a spec that omits a response the API really returns. * Recognize Cadwyn routers in the OpenAPI error-response check ROUTER_CLASSES omitted VersionedAPIRouter, so router-level `responses=` was invisible on every Cadwyn-based execution API route, and three statuses those routers already declare were reported as undeclared. prek executes hook scripts directly, so the script needs its executable bit to run at all. (cherry picked from commit 8d4ab8a)
pierrejeambrun
requested review from
amoghrajesh,
ashb,
bbovenzi,
bugraoz93,
choo121600,
ephraimbuddy,
gopidesupavan,
guan404ming,
henry3260,
jason810496,
jscheffl,
kaxil,
potiuk,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
September 30, 2026 16:51
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.
Backport of #71647 to
v3-3-test.Cherry-picked from 8d4ab8a.
Two files conflicted and were scope-narrowed to this PR's actual change (the
create_openapi_http_exception_docimport and theresponses=additions), dropping main-only context that does not exist onv3-3-test:core_api/routes/ui/assets.py— kept the release-branch imports and added onlycreate_openapi_http_exception_doc; dropped theget_assetsUI handler and itsOnlyActiveFilter/ReadableAssetsFilterDep/requires_access_asset_aliasimports (main-only). Applied the404onnext_run_assets.execution_api/routes/asset_events.py— dropped the main-only_parse_extra_paramshelper; applied only the400on/by-asset(the handler here raises that 400 directly onv3-3-test).The new
check-openapi-exception-doc-in-synchook passes on allv3-3-testroute files.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines
🤖 Generated with Claude Code