Skip to content

Make a valid 2020-12 schema#80

Open
neilmb wants to merge 6 commits intomainfrom
nmb/73-valid-schema
Open

Make a valid 2020-12 schema#80
neilmb wants to merge 6 commits intomainfrom
nmb/73-valid-schema

Conversation

@neilmb
Copy link
Collaborator

@neilmb neilmb commented Mar 12, 2026

This is a large change that makes no changes to the DCAT schema, but it updates the version of the JSON Schema that we use so that we can properly connect our Catalog schema to the sub-schemas using correct values for $id. We no longer need a top-level dcat_us_3.0.0_schema.json file that pulls in all of the sub-schemas and we delete an unused definitions/Person.json that never appears anywhere else. We also update the test_json_schema.py program to use the new setup.

In the process we

  • removed $id from many, many places where it wasn't appropriate
  • added top-level description text for each schema and sub-schema
  • replaced oneOf with anyOf where appropriate
  • simplified description values throughout to make them more appropriate for use in a JSON Schema (i.e. removing "This property refers to ..." wherever it appears)
  • clarified description values that have array values to specify that the property is a "List of ..."
  • removed trailing periods from description values

Apologies to anyone who has to review all these changes, but hopefully they are very straightforward since they make the same type of changes over and over and over again.

Closes #73.

Copy link
Collaborator

@jbrown-xentity jbrown-xentity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, there are a lot of comments, but essentially this PR is trying to do 3 things:

  • Flatten where possible (there are many locations of different possibilities of types for a field, and that optional list contains a single type of another possible list, which is redundant and silly).
  • Update descriptions to be more declaritive and clear, reference the actual thing they are describing.
  • Remove ID's and declare ID's at the class level, and update all references accordingly.

These are huge improvements, and current tests show that everything is passing!

My comments generally fall in 2 categories:

  • Possible better/future cleanup
  • 1 single error in the entire list.

I'm approving and giving my tentative backing to merge and start from this much better point!

@neilmb
Copy link
Collaborator Author

neilmb commented Mar 13, 2026

I think that I have addressed all of the feedback now. Thanks @zopalmer14 and @jbrown-xentity for your close reading!

Copy link
Collaborator

@jbrown-xentity jbrown-xentity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still looks good.

@neilmb
Copy link
Collaborator Author

neilmb commented Mar 13, 2026

The Tiger Team is approving of this as code-cleanup and improvements in structure with no schema changes.

@jbrown-xentity jbrown-xentity added approved bug Something isn't working and removed ready-for-review labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DCAT-US3 JSON Schema doesn't comply with standard

3 participants