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 load RELATIVE $ref property #913
Comments
I have fixed the issue and created a pull request. Please approve: |
eugeniace
pushed a commit
to eugeniace/swagger-parser
that referenced
this issue
Nov 8, 2018
Please approve the fix for this issue: |
gracekarina
added a commit
that referenced
this issue
Nov 8, 2018
Fix for #913 - problem with properties in object #ref
Fixed by #917 please let us know if this keeps happening. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We defined a swagger file ( src/main/resources/BS/ApiSpecification.swagger ) that references a property defined in a JSON file (src/main/resources/BO/Resource/ApiSpecificationBO.json).
In ApiSpecificationBO.json file there is a relative $ref property defined in another JSON (src/main/resources/BO/Common/BasicComponents.json).
The class generating fails with the fallowing error from swagger-parser:
Unable to load RELATIVE ref: ../Common/BasicComponents.json path: C:\utils-app\src\main\resources\BS
As we can see, it tries to resolve the reference to the second JSON file considering as a parent folder the one where the initial swagger file is placed, and not the folder where the JSON file containing the $ref is placed.
We used version v1.0.39.
Resources:
src/main/resources/BS/ApiSpecification.swagger:
src/main/resources/BO/Resource/ApiSpecificationBO.json
src/main/resources/BO/Common/BasicComponents.json
src.zip
The text was updated successfully, but these errors were encountered: