-
Notifications
You must be signed in to change notification settings - Fork 7
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
definitions not updated to $defs #43
Comments
I wonder if this is more of an issue around the schemas being embedded in an OpenAPI doc rather than being independent schemas. I'm not sure if the tool takes that into account. |
This is a good point, and it is not related to being OpenAPI. Alterschema is doing a bunch of JSON-replacements to the given schema, but it is not amending JSON pointers touching those paths at all. I'll send a PR to fix this for |
While we currently upgrade "definitions" to "$defs" in the JSON Schema definition, pointers going through "definitions" are currently left intact. See: #43 Signed-off-by: Juan Cruz Viotti <[email protected]>
While we currently upgrade "definitions" to "$defs" in the JSON Schema definition, pointers going through "definitions" are currently left intact. See: #43 Signed-off-by: Juan Cruz Viotti <[email protected]>
@chris-smith-zocdoc @gregsdennis The fix for the However, let's keep this issue open until we figure out a more general way to deal with transformations within pointers. |
I'm thinking about something along these lines: Alterschema has the concept of iterating through every subschema of any JSON Schema definition across specification versions. Though that mechanism, Alterschema can accurately collect JSON Pointers to every subschema of a given schema. In turn, that information would allow us to break up a JSON Pointer, accurately know which fragments correspond to sub schemas, and try to re-apply some variant of the transformation rules we have WITHIN the pointers themselves. I'll aim to book some time to hack on this tonight! |
See: #43 Signed-off-by: Juan Cruz Viotti <[email protected]>
See: #43 Signed-off-by: Juan Cruz Viotti <[email protected]>
See: #43 Signed-off-by: Juan Cruz Viotti <[email protected]>
See: #43 Signed-off-by: Juan Cruz Viotti <[email protected]>
Using https://alterschema.sourcemeta.com/ to translate the open api v3 spec from Draft-04 to 2019-09 re: OAI/OpenAPI-Specification#2996
Mostly worked except the definitions references weren't updated to defs. The schema appears valid after making this replacement (according to https://www.jsonschemavalidator.net )
The text was updated successfully, but these errors were encountered: