Skip to content
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 use external $ref's with OpenAPI #208

Open
tomisme opened this issue Oct 2, 2024 · 3 comments
Open

Unable to use external $ref's with OpenAPI #208

tomisme opened this issue Oct 2, 2024 · 3 comments

Comments

@tomisme
Copy link

tomisme commented Oct 2, 2024

I tried to use Martian with this OpenAPI spec: https://api-docs.solaranalytics.com/OpenAPI-Specs/sapublic-openapi.yaml

But when I ran martian/explore it came back with an empty vec. I think the issue is the external refs in the paths e.g. $ref: "./sainternal/V3/paths/token.yaml#/TokenV3"

Looking at the Martian code it seems like martian.schema/lookup-ref should be throwing "Non-local references are not supported" but I don't get any errors when bootstrapping.

@tomisme tomisme changed the title Unable to use external $ref's Unable to use external $ref's with OpenAPI Oct 2, 2024
@tomisme
Copy link
Author

tomisme commented Oct 2, 2024

Apologies, just saw this message about remote refs not currently supported #190 (comment)

@oliyh
Copy link
Owner

oliyh commented Oct 4, 2024

Hello,

So do you think there is a bug - it should throw an exception?

Otherwise I think the answer given there - that you can pre-walk with your own resolver - is the best one.

Cheers

@tomisme
Copy link
Author

tomisme commented Oct 7, 2024

I think it might be a bug yeah, I didn't get any indication that the bootstrapping hadn't worked, the refs were just ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants