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

Behaviour of missing values in data #559

Open
rhiaro opened this issue Feb 20, 2024 · 1 comment
Open

Behaviour of missing values in data #559

rhiaro opened this issue Feb 20, 2024 · 1 comment
Assignees
Labels
jsonschema Related to the JSON Schema validation question tests Schema tests

Comments

@rhiaro
Copy link
Collaborator

rhiaro commented Feb 20, 2024

Currently the schema excludes the possibility of optional fields being present with null values. It seems like the expected behaviour is that where data is missing, the fields must always be excluded.

I just want to check this is intentional.

(I could imagine, for example, a system which outputs data where all fields are present, and the missing ones are simply left blank. At the moment that wouldn't validate - but there's an easy change to the schema to ensure it would.)

Either way, if this is intended behaviour, we should make sure it's documented, so that the situation I just imagined never comes to pass!

@rhiaro rhiaro added question tests Schema tests jsonschema Related to the JSON Schema validation labels Feb 20, 2024
@kathryn-ods
Copy link
Contributor

I agree optional fields should be allowed to be blank. I don't know whether this was an intentional choice previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jsonschema Related to the JSON Schema validation question tests Schema tests
Projects
None yet
Development

No branches or pull requests

3 participants