Repository navigation
openapi3: support OAS 3.2 query and additionalOperations - #1240
Merged
Merged
Conversation
Add the OpenAPI 3.2 Path Item Object fields for custom HTTP methods: the fixed query field (HTTP QUERY) and additionalOperations, a map of custom method names to operations. - PathItem gains Query and AdditionalOperations; Operations(), GetOperation() and SetOperation() cover them. SetOperation no longer panics on unknown methods; they are stored in AdditionalOperations. - Both fields are version-gated: validating a pre-3.2 document that uses them fails with query-field-for-3-2-plus / additional-operations-field-for-3-2-plus. AdditionalOperations keys must be RFC 9110 tokens and must not duplicate a fixed-field method. - Schema/parameter walkers address custom methods with /additionalOperations/<METHOD> JSON pointers, preserving case. - openapi2conv.FromV3 and FromV3PathItem return an error instead of panicking for methods Swagger 2.0 cannot express. - routers/legacy: guard a nil-node dereference in the FindRoute fallback when the document declares an operation absent from the route trie. - Routers and openapi3filter need no changes: both derive method sets from Operations(), proven by new routing and request-validation tests for QUERY and custom methods. Co-Authored-By: Claude Fable 5 <[email protected]>
mromaszewicz
force-pushed
the
feat/custom-methods
branch
from
August 4, 2026 21:40
4f0bb27 to
742966c
Compare
fenollp
approved these changes
Aug 5, 2026
Collaborator
|
Thanks! |
This was referenced Aug 5, 2026
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.
Add the OpenAPI 3.2 Path Item Object fields for custom HTTP methods: the fixed query field (HTTP QUERY) and additionalOperations, a map of custom method names to operations.