Skip to content
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

Implement JSON schema compatibility check #167

Merged
merged 39 commits into from
Oct 26, 2023
Merged

Conversation

punit-kulal
Copy link
Contributor

@punit-kulal punit-kulal commented Sep 27, 2023

Features

  • Support all drafts of json schema, take default as 2020 when schema draft version is not defined.
  • Only supports testing of open model json schema (additional properties is true) and fails with error if that's not the case.
  • Support only json Backward compatibility test.

Changes

  • Bump go version to 1.20 due to updated jsonschema library(requires >1.19) and use of generics (requires >1.20)
  • Update pipelines to use newer version of earlier used actions.
  • Implement backward compatibility check for open content model.
    • No field delete.
    • Specifying additional properties is prohibited. (To ensure open content model)
    • No change in required fields.
    • No change in external or internal ref
    • Type specific checks(Type change)
    • No change schema validation condition for allOf
    • Only addition for schema validation condition like oneOf, anyOf

Not in scope

  • Add tests for explore subfunctions.
  • Validation keyword conflicts

@punit-kulal punit-kulal marked this pull request as ready for review October 3, 2023 06:56
formats/json/compatibility.go Outdated Show resolved Hide resolved
formats/json/compatibility.go Outdated Show resolved Hide resolved
formats/json/utils.go Show resolved Hide resolved
formats/json/compatibility_helper_test.go Outdated Show resolved Hide resolved
@ravisuhag ravisuhag merged commit efce4da into main Oct 26, 2023
6 checks passed
@ravisuhag ravisuhag deleted the json-compatibility branch October 26, 2023 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants