Skip to content

Comments

Reduce number of required properties#28

Merged
rowanc1 merged 2 commits intomainfrom
relax-schema
Dec 22, 2025
Merged

Reduce number of required properties#28
rowanc1 merged 2 commits intomainfrom
relax-schema

Conversation

@nokome
Copy link
Collaborator

@nokome nokome commented Dec 22, 2025

The initial versions of YAML schema definitions listed properties which should really be optional, as required. This was partly a mistake and partly blindly following what had already been setup in oxa-types.json.

Before

> node packages/oxa/dist/cli.cjs validate
{"type":"Document","children":[]}

<stdin>: invalid
  /: must have required property 'metadata'
  /: must have required property 'title'

After

> node packages/oxa/dist/cli.cjs validate
{"type":"Document","children":[]}
<stdin>: valid

The initial versions of schema definitions listed properties that should really be optional
as required. This was partly a mistake and partly blindly following what had already
been setup in `oxa-types.json`.
@nokome nokome requested a review from rowanc1 December 22, 2025 20:42
@rowanc1 rowanc1 merged commit 3ec0745 into main Dec 22, 2025
2 checks passed
@rowanc1 rowanc1 deleted the relax-schema branch December 22, 2025 23:23
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