Below is an extract from my JSON schema.
I want to specify that both algorithm and results are required.
Additionally I want to specify:
- when
algorithmisalgorithm1, then results must be one ofresults1,results2, orresults3. - when
algorithmisalgorithm2, then results must be one ofresults2,results3, orresults4.
Is this possible?
"algorithm": {
"description": "description...",
"type": "string",
"enum": [
"",
"algorithm1",
"algorithm2"
]
},
"results": {
"description": "description...",
"type": "string",
"enum": [
"",
"results1",
"results2",
"results3",
"results4"
]
},
"required": ["algorithm", "results"]