Skip to content

Migrate null type unions to anyOf in strict schemas (#5991) - #6362

Merged
hyperupcall merged 3 commits into
SchemaStore:masterfrom
shiv07-blip:strict-validation-5991
Sep 19, 2026
Merged

hyperupcall merged 3 commits into
SchemaStore:masterfrom
shiv07-blip:strict-validation-5991

Conversation

@shiv07-blip

Copy link
Copy Markdown
Contributor

Summary

Replaces type: ["X", "null"] unions with explicit anyOf branches in strict schemas.

Ajv allows two-element null unions in strict mode, so these can pass without being caught. This change makes the nullable types explicit:

type: ["X", "null"]anyOf: [{ "type": "X" }, { "type": "null" }]

Type-specific keywords such as items, properties, minLength, format, and additionalProperties are moved into the non-null branch. Annotations like description, default, and title remain at the definition level.

This batch updates schemas with 1–5 null unions each, including the abc-supply-plan schemas, docker-bake, git-cliff, github-cli-config, hugo, jekyll, pubspec, rumdl, and others.

Files already covered by other open PRs are left untouched.

Validation

  • npm run prettier
  • npm run typecheck
  • npm run eslint
  • git diff --check
  • node ./cli.js check
  • node ./cli.js coverage

Implements #5991.

@madskristensen

Copy link
Copy Markdown
Contributor

This has a merge conflict.

@shiv07-blip

Copy link
Copy Markdown
Contributor Author

@madskristensen Okay, i am working on it.

@shiv07-blip

Copy link
Copy Markdown
Contributor Author

@madskristensen , please review now and proceed

@hyperupcall hyperupcall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. Had a question about these changes.

Comment thread src/schemas/json/pyproject.json
Comment thread src/schemas/json/pyproject.json
@hyperupcall
hyperupcall merged commit 897f502 into SchemaStore:master Sep 19, 2026
7 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.

3 participants