Skip to content

Replace dependentRequired keywords by dependencies #141

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

Merged
merged 3 commits into from
Jul 2, 2025

Conversation

richfab
Copy link
Contributor

@richfab richfab commented Sep 25, 2024

Context

The dependentRequired keyword conditionally requires that certain properties must be present if a given property is present in an object. This conditional requirement is used for example to return an error if terms_url is defined but terms_last_updated is missing.

Problem

According to the JSON Schema doc:

Previously to Draft 2019-09, dependentRequired and dependentSchemas were one keyword called dependencies.

Since we're using a version of JSON Schema prior to Draft 2019-09, we must use the keyword dependencies.

What's Changed

This PR replaces dependentRequired keywords by dependencies in system_information.json for v2.3, v3.0, v3.1-RC and v3.1-RC2.

Before After
The JSON Schema incorrectly returned valid when terms_url was defined but terms_last_updated was missing. The JSON Schema returns an error when terms_url is defined but terms_last_updated is missing (as expected).

@richfab richfab requested review from davidgamez, qcdyx and emmambd and removed request for isabelle-dr July 2, 2025 16:17
@richfab richfab merged commit b8cfc2f into master Jul 2, 2025
1 check passed
@richfab richfab deleted the fix/dependencies-keyword branch July 2, 2025 16:27
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.

2 participants