Bundling - managing references #483
Replies: 2 comments 14 replies
-
Hey @FTravaglini-crif , Thanks for reaching out!
Interesting to hear that!
The current approach strictly follows the JSON Schema Bundling algorithm (https://json-schema.org/blog/posts/bundling-json-schema-compound-documents) but I'm all for an improvement like this to help with less compliant tooling, at least as an opt-in option. Let me get into this on Monday. I'll probably have it ready and released by then (it's not a hard one, I think!)
As an aside, I'm very curious about your experience with Apicurio, how you are using it, and if you are facing any limitations. We at Sourcemeta are actively working on a JSON Schema Registry (https://www.sourcemeta.com) that aims to be very performant and compliant, and any feedback from your Apicurio use case would be really interesting for us to hear about! |
Beta Was this translation helpful? Give feedback.
-
@FTravaglini-crif Actually, before I try this improvement, have you tried the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, the opeani-generator plugin doesn't support the '$ref' keyword according to json schema specifications, and before looking in the defs for the referenced schema tries to reach the URL https://example.com/string, to use the example in the documentation.
Let's say I have this schema on my apicurio registry
In this case, if I reference in my openapi.yaml the API GET (https://apicurio.com/apis/registry/v3/groups/jsonschemas/artifacts/person/versions/1/content) I can retrieve the json from the registry, but than the openapi generator, to generate the PersonDTO will try to reach "https://example.com/party", and won't resolve it with the local schema in the "$defs".
I was wondering if it could be useful to add a step to the bundling process: the addition of '#/$defs/' to the reference of the schema ( -> "$ref": "#/$defs/https://example.com/party"). It's probably not that common but I don't see downsides to this modification
Beta Was this translation helpful? Give feedback.
All reactions