Help needed with a recursive schema #970
Replies: 1 comment 1 reply
-
|
The problem is the {
"type": "object",
"patternProperties": {
"status": { "type": "string" },
"^(?!(status)$).*$": { "$ref": "#" }
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Folks, I’m hoping someone can tell me what I’m doing wrong here.
I want define a schema that will allow nested objects where each level either contains the key ‘status’ or an nested object of the same type. So any of the following should be valid
but the following should be invalid
The schema I have is:
which is meant to be:
But this schema only seems to pick up the errors at even numbers of nesting, so the following all fail as expected
but the following pass
Beta Was this translation helpful? Give feedback.
All reactions