Skip to content

Added tests for the interaction of default and required.#835

Open
mwadams wants to merge 2 commits intojson-schema-org:mainfrom
endjin:main
Open

Added tests for the interaction of default and required.#835
mwadams wants to merge 2 commits intojson-schema-org:mainfrom
endjin:main

Conversation

@mwadams
Copy link
Contributor

@mwadams mwadams commented Feb 10, 2026

Closes #834

@mwadams mwadams requested a review from a team as a code owner February 10, 2026 08:35
@mwadams mwadams marked this pull request as draft February 10, 2026 08:36
Copy link
Member

@gregsdennis gregsdennis left a comment

Choose a reason for hiding this comment

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

Need to add to v1 as well.

Copy link
Member

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

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

Can you add this to the v1 tests as well. Thanks. (Nevermind. Should have read Greg's review before commenting 😅)

@notEthan
Copy link
Contributor

Would it be worth adding a variant with default + required keywords being siblings? e.g.

{
    "type": "object",
    "default": {"alpha": 5},
    "required": ["alpha"]
}

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.

Testing interaction of default with required

4 participants