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

Disallow properties with type array and no items #1221

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

pstokkink
Copy link
Contributor

@pstokkink pstokkink commented Jan 9, 2025

NB: Schema validation should fail, with the accAfvalwijzer schema having two properties with type "array" and no "items". Locally this is already tested, but we should probably let the GH action do its work too. Perhaps by updating the schema prop in the faulty dataset schema?

  • Created two new minor versions: 1.4.0 and 2.1.0
  • Added an if/then block to row-meta-schema.json in each of those which checks if the "type" is "array". This alone is not enough, because when there is a "$ref", this check is also true, even when there is no "type" in the property, so this is also excluded.
  • Updated the pre-commit.config to use the latest versions.
  • Minor correction in README.md.
  • Minor addition to .gitignore.

This contains a new check in row-meta-schema.json:152 which ensures that when a property has type "array", that "items" is also present.
@pstokkink pstokkink requested a review from a team as a code owner January 9, 2025 14:26
@pstokkink pstokkink merged commit 449541d into master Jan 15, 2025
3 checks passed
@pstokkink pstokkink deleted the disallow-properties-with-type-array-and-no-items branch January 15, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants