github.com/olli-ai/jx/v2@v2.0.400-0.20210921045218-14731b4dd448/pkg/surveyutils/test_data/AllOfIf.test.schema.json (about) 1 { 2 "$id": "https:/jenkins-x.io/tests/basicTypes.schema.json", 3 "$schema": "http://json-schema.org/draft-07/schema#", 4 "description": "test values.yaml", 5 "type": "object", 6 "properties": { 7 "enablePersistentStorage": { 8 "type": "boolean" 9 }, 10 "enableCheese": { 11 "type": "boolean" 12 } 13 }, 14 "AllOf" : [ 15 { 16 "if": { 17 "properties": { 18 "enablePersistentStorage": { 19 "const": "true", 20 "type": "boolean" 21 } 22 } 23 }, 24 "then": { 25 "properties": { 26 "databaseConnectionUrl": { 27 "type": "string" 28 }, 29 "databaseUsername": { 30 "type": "string" 31 }, 32 "databasePassword": { 33 "type": "string", 34 "format": "password" 35 } 36 } 37 }, 38 "else": { 39 "properties": { 40 "enableInMemoryDB": { 41 "type": "boolean", 42 "default": true 43 } 44 } 45 } 46 }, 47 { 48 "if": { 49 "properties": { 50 "enableCheese": { 51 "const": "true", 52 "type": "boolean" 53 } 54 } 55 }, 56 "then": { 57 "properties": { 58 "cheeseType": { 59 "type": "string" 60 } 61 } 62 }, 63 "else": { 64 "properties": { 65 "iDontLikeCheese": { 66 "type": "boolean", 67 "default": true 68 } 69 } 70 } 71 }] 72 }