-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to parse Parameter $ref with cross-path references #2116
Labels
Comments
ludovicianul
added a commit
to ludovicianul/swagger-parser
that referenced
this issue
Aug 12, 2024
This was referenced Aug 12, 2024
ludovicianul
added a commit
to ludovicianul/swagger-parser
that referenced
this issue
Aug 12, 2024
ludovicianul
added a commit
to ludovicianul/swagger-parser
that referenced
this issue
Aug 13, 2024
…ng with #/paths are properly processed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When parsing the Parameters section from an operation, cross-path reference parameters are ignored. This is not consistent with other elements which are properly included in the final OpenAPI object.
swagger-parser version
Version 2.1.22
OpenAPI declaration file content or url
Full spec file is here: https://github.com/APIs-guru/openapi-directory/blob/main/APIs/opensuse.org/obs/2.10.50/openapi.yaml
Generation Details
Use the following code:
You can then check the Parameters list of the DELETE operation is empty instead of having one parameter.
Steps to reproduce
See above
Suggest a fix
The issue seems to be this code from the
io.swagger.v3.parser.processors.ParameterProcessor
class:Which only includes refs that are from the
components
section. One possible fix is that it should just include parameters that are referencing other paths 'as is' rather than trying to solve it.The text was updated successfully, but these errors were encountered: