Repository navigation
Return nil from request_operation for a document without paths - #227
Open
takayamaki wants to merge 4 commits into
Open
takayamaki wants to merge 4 commits into
takayamaki wants to merge 4 commits into
Conversation
OpenAPI 3.1 allows a document with only webhooks and no paths. For such a document, request_operation raised NoMethodError because the path item finder was nil. It now returns nil, which matches its documented contract for "not found".
A document without paths still exposes its webhooks. A document with empty paths returns nil from request_operation, as before.
takayamaki
marked this pull request as ready for review
October 27, 2026 14:42
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.
Part of #215 (item 8).
OpenAPI 3.1 allows a document with only
webhooksand nopaths.Such a document loads, but
request_operationraisedNoMethodError, because there was no path item finder.Changes
request_operationnow returnsnilfor a document withoutpaths.This matches its documented return value for an operation that is not found.
paths: {}already returnednil, and still does.webhooksare not changed.They are still loaded and can be read from the document.