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

Not validated by if #298

Open
codememory1 opened this issue Dec 14, 2022 · 2 comments
Open

Not validated by if #298

codememory1 opened this issue Dec 14, 2022 · 2 comments
Assignees
Labels

Comments

@codememory1
Copy link

codememory1 commented Dec 14, 2022

Exist json schema:

{
    "type": "object",
    "properties": {
        "number_streams": {
            "if": {
                "type": "integer",
                "maximum": 100
            },
            "else": {
                "type": "string",
                "enum": ["auto"]
            }
        }
    },
    "required": ["number_streams"],
    "additionalProperties": false
}

input json:

{"number_streams": "error_string"}

OR

{"number_streams": 2323}

IsValid = true =)
errors = []

Json schema validate online - https://www.jsonschemavalidator.net/s/f4xuQvGC = is ok

@localheinz localheinz self-assigned this Dec 15, 2022
@localheinz localheinz added the bug label Dec 15, 2022
@ergebnis-bot
Copy link
Member

Since this issue has not had any activity within the last 180 days, I have marked it as stale.

I will close it if no further activity occurs within the next 14 days.

@ergebnis-bot ergebnis-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2023
@localheinz localheinz reopened this Jun 28, 2023
@settings settings bot removed the stale label Jun 28, 2023
@localheinz
Copy link
Member

@codememory1

I can confirm that this does not work as expected. There is a corresponding (but closed) issue for justinrainbow/json-schema, the problem is obviously a lack of support: jsonrainbow/json-schema#610.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants