Skip to content

Schemas: Update schema to use JSON v2020-12 and validation - #36

Merged
natalialuzuriaga merged 5 commits into
mainfrom
nat/schema-major-updates
Sep 3, 2025
Merged

Schemas: Update schema to use JSON v2020-12 and validation#36
natalialuzuriaga merged 5 commits into
mainfrom
nat/schema-major-updates

Conversation

@natalialuzuriaga

@natalialuzuriaga natalialuzuriaga commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

Problem

Currently, the metaschema of code.json follows JSON schema v4. We would like to use JSON schema v2020-12 since this is the official standard. We would also like to add validation functionality features that comes with it.

Solution

  • Updated schema (both gov and CMS schemas) to use JSON v2020-12
  • Added minimum validation to ensure a 0 minimum for numeric fields
  • Added uniqueItems: true to ensure no duplicates for arrays
  • Updated usage of additionalProperties for all object fields
  • Updated tests accordingly
  • CMS schema: Removed upstream field since SBOM is now in play

…M field

Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>

@decause-gov decause-gov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM +1 🚢

@natalialuzuriaga
natalialuzuriaga merged commit 6556bf0 into main Sep 3, 2025
6 checks passed
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