-
Notifications
You must be signed in to change notification settings - Fork 78
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
Passing "resolveInternal" option causes "RangeError" when resolving a spec #420
Comments
An additional note - this the schema does have recursion and is structured as given in the example from the json-schema docs - https://json-schema.org/understanding-json-schema/structuring.html#recursion |
A quick example test case -
the schema in a file
The command to run is -
|
What is your expected (non infinite) output if all internal references are to be replaced? |
That's a good question. IMO resolving it to the top level would suffice with a reference back to the object itself further down the tree. This would be the desired output -
|
That is exactly the output if you don't specifiy |
I think I simplified my test yaml too much without showcasing the actual use case I am looking to solve.
if I don't specify
It resolves it the first time, and then any future references point to the first place it was resolved. Our goal was to have it resolve in all spots, which is why we added |
Detailed description
This might be a bug with oas-resolver but the front-door we are using to resolve the OpenApi specs is speccy.
Resolving refs works fine with the following options
The above options cause the first external ref to be resolved, but subsequent external refs to that same file get converted to internal refs.
We have a use case where we need all the refs to be resolved and not have any internal refs, so I used the following options
This causes the following error -
The text was updated successfully, but these errors were encountered: