Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON compatibility check for exclusive maximum/minimum #1318

Closed
hhkkxxx133 opened this issue Mar 10, 2021 · 2 comments
Closed

JSON compatibility check for exclusive maximum/minimum #1318

hhkkxxx133 opened this issue Mar 10, 2021 · 2 comments
Assignees
Labels
Bug Something isn't working

Comments

@hhkkxxx133
Copy link
Contributor

Hello,

We were testing the JSON compatibility rule. For the test case, I believe they are essentially the same as both are requiring number > 10. Therefore, they should be backward, forward and full compatible, right? But the result turns out to be incompatible for all 3 settings.

"original": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "number",
    "minimum": 10,
    "exclusiveMinimum": true
},
"updated": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "number",
    "exclusiveMinimum": 10
}

Same applies for ExclusiveMaximum:

"original": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "number",
    "maximum": 10,
    "exclusiveMaximum": true
},
"updated": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "number",
    "exclusiveMaximum": 10
}

Let me know what do you think.

@hhkkxxx133 hhkkxxx133 changed the title JSON Compatibility check for exclusive maximum/minimum JSON compatibility check for exclusive maximum/minimum Mar 10, 2021
@jsenko
Copy link
Member

jsenko commented Mar 11, 2021

Hi, yes this looks correct - it should be full compatible.

@EricWittmann EricWittmann added the Bug Something isn't working label Mar 11, 2021
@EricWittmann
Copy link
Member

Marking as a bug - correct, @jsenko ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants