Skip to content

Add maximum tests#922

Open
codefromlani wants to merge 6 commits into
json-schema-org:unifyfrom
codefromlani:validation-maximum
Open

Add maximum tests#922
codefromlani wants to merge 6 commits into
json-schema-org:unifyfrom
codefromlani:validation-maximum

Conversation

@codefromlani

Copy link
Copy Markdown

No description provided.

@codefromlani codefromlani requested a review from a team as a code owner June 9, 2026 18:00

@jdesrosiers jdesrosiers 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.

It looks like the draft-03 and draft-04 tests include exclusiveMaximum tests in maximum.json. Starting in draft-06, it splits them into maximum.json and exclusiveMaximum.json.

We should make this consistent. With the unified format, I think it will make most sense to merge exclusvieMaximum.json into maximum.json. Let's do that.

Comment thread validation/tests/maximum.json Outdated
@@ -0,0 +1,105 @@
{
"$schema": "../validation-test-schema.json",
"description": "maximumvalidation",

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.

Let's take care to make human readable descriptions. It doesn't have to be detailed. At a minimum, this should have space between "maximum" and "validation".

Comment thread validation/tests/maximum.json Outdated
},
{
"description": "maximum validation (explicit false exclusivity)",
"compatibility": "=4",

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.

Suggested change
"compatibility": "=4",
"compatibility": "3,<=4",

Comment thread validation/tests/maximum.json Outdated
},
{
"description": "exclusiveMaximum validation",
"compatibility": "=4",

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.

Suggested change
"compatibility": "=4",
"compatibility": "3,<=4",

@codefromlani

Copy link
Copy Markdown
Author

It looks like the draft-03 and draft-04 tests include exclusiveMaximum tests in maximum.json. Starting in draft-06, it splits them into maximum.json and exclusiveMaximum.json.

We should make this consistent. With the unified format, I think it will make most sense to merge exclusvieMaximum.json into maximum.json. Let's do that.

Done, I updated one of the descriptions.
minimum also has exclusiveMinimum starting in draft 6. Should I merge that as well?

@jdesrosiers jdesrosiers 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.

Looks good, but make sure you're merging and removing the v1 tests as well.

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