Whether latest version supports keyword "discriminator" in json schema validation ? #239
Unanswered
orangemail
asked this question in
Q&A
Replies: 1 comment
-
|
recently I added https://github.com/santhosh-tekuri/jsonschema/blob/boon/example_vocab_openpapi_discriminator_test.go to showcase how to add |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I have schema.json like given below.
"listInfo": {
"properties": {
"list": {
"discriminator": {
"mapping": {
"BULK": "#/$defs/oldList",
"NETWORK": "#/$defs/newList"
},
"propertyName": "listType"
},
"oneOf": [
{
"$ref": "#/$defs/oldList"
},
{
"$ref": "#/$defs/newList"
}
],
"title": "List"
}
},
"required": [
"list"
],
"title": "listInfo",
"type": "object"
},
And in data.json I'm filling only, oldList.
But, schema validation using the library is throwing error like "newList" property is missing.
In short, whether latest library support "discriminator" ?
Beta Was this translation helpful? Give feedback.
All reactions