json-schema-org / upgrade-downgrade-rules

A set of transformation rules to convert between JSON Schema specification versions
Other
2 stars 1 forks source link

Add Draft 7 to 2019-09 upgrade rules #20

Closed suprith-hub closed 3 months ago

suprith-hub commented 3 months ago

@jviotti I have added the rules for draft7 to 2019-09 except for ignore adjacent keywords when $ref is present I have tested the rules. Please review the PR

jviotti commented 3 months ago

Very cool! Let me give it a proper careful look tomorrow

jviotti commented 3 months ago

Two initial overall comments:

jviotti commented 3 months ago

Also, if we will go for numeric prefixes, I think you should also add them to the 2019-09 => 2020-12 existing rules, so that the entire repo is consistent. Maybe do those as a quick separate PR?

jviotti commented 3 months ago

Another big one is that I see a lot of tests removing keywords that in fact do exist in 2019-09. Maybe you mis-read the spec? Can you handle those first? I think it will make the rest of the PR easier to review. You can see all 2019-09 keywords here: https://www.learnjsonschema.com/2019-09/

suprith-hub commented 3 months ago

Another big one is that I see a lot of tests removing keywords that in fact do exist in 2019-09. Maybe you mis-read the spec? Can you handle those first? I think it will make the rest of the PR easier to review. You can see all 2019-09 keywords here: https://www.learnjsonschema.com/2019-09/

Hm.... I think you missed what the rules tries to convey, maybe I should rename the rule title to unknown in previous draft. Which means it should remain unknown in next draft too....

suprith-hub commented 3 months ago

Let me also break the PR 😅

jviotti commented 3 months ago

Haha yes. I forgot about that. Maybe let's make the rule names a bit more descriptive so that others don't get confused too? Cool that you are breaking the PR. Probably easy to review. Let me know when you have done so!