Skip to content

Instantly share code, notes, and snippets.

@Jakemangan
Created November 8, 2018 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Jakemangan/bf4d20aa3a0f2d2bfbd39dc6e21ca334 to your computer and use it in GitHub Desktop.
Save Jakemangan/bf4d20aa3a0f2d2bfbd39dc6e21ca334 to your computer and use it in GitHub Desktop.
"questionA": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"minLength": 1,
"enum": ["Yes", "No"]
}
}
}
"questionB": {
"type": "object",
"properties": {
"answer": {
"type": null,
}
}
}
"questions": {
"type": "object",
"properties": {
"A": {"$ref": "#/definitions/questionA"},
"B": {"$ref": "#/definitions/questionB"}
},
"if": {
"properties" : {
"A": {"enum": ["Yes"]}
}
},
"then": {
"B": //Type = string and min length = 1 <-- Unsure what to put here to change the type of QuestionB
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment