Skip to content

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, emmambd and qcdyx 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.

3 participants