-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Recursive / Deep ref hanging / Possible Compatibility Issue #423
Comments
Signed-off-by: Pierre Fenoll <[email protected]>
|
@fenollp thanks - yes converting the entire ref document to v3 does seem to fix - but unfortunately I don't own the source document. would you have any suggestion on how to reference it? out of interest, since the content being referenced could (as far as i understand) be any valid jsonschema document, would there be anything to do to relax |
Short term either write your document in v2, or load the ref document then convert it then ref it and output the result and use that as your spec.
kin-openapi/openapi3/loader.go Line 450 in 9b46ae7
A good enough intermediary could be to halt and error when ref-ing a v2 document instead of looping infinitely. |
Signed-off-by: Pierre Fenoll <[email protected]>
Signed-off-by: Pierre Fenoll <[email protected]>
I've noticed when trying to reference an external schema, the following hangs in an infinite parsing loop, perhaps because of some recursive refs in the external document:
I'm aware that the referenced document is a swagger v2 document, but given that its just a schema ref to jsonschema objects, i hoped it would be possible to reference succesfully. from what i can see, incompatability doesn't seem to be the problem.
I can see that the code seems to just end up circling around
loader.resolveSchemaRef
for#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps
and a few other types in the reference document which are very recursive in their definition, but i'm unsure if the reason for hanging is an endless recursive loop, or what.Would be happy to contribute a fix if there is one but so far i've been unable to diagnose what exactly is going on..
The text was updated successfully, but these errors were encountered: