Skip to content

Commit e33410b

Browse files
committed
Testing
1 parent 2c67e7e commit e33410b

File tree

3 files changed

+492
-293
lines changed

3 files changed

+492
-293
lines changed

example_schema.json

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,43 @@
11
{
2-
"title": "Pet Registration",
32
"type": "object",
43
"properties": {
5-
"pet_type": {
6-
"type": "string",
7-
"enum": ["dog", "cat"],
8-
"title": "Pet Type"
9-
},
10-
"details": {
11-
"title": "Details",
4+
"mode": { "type": "string", "enum": ["basic", "advanced"] },
5+
"settings": {
6+
"type": "object",
127
"if": {
13-
"properties": {
14-
"pet_type": { "const": "dog" }
15-
}
8+
"properties": { "mode": { "const": "advanced" } },
9+
"required": ["mode"]
1610
},
1711
"then": {
1812
"properties": {
19-
"breed": {
20-
"type": "string",
21-
"title": "Dog Breed"
22-
},
23-
"trained": {
24-
"type": "boolean",
25-
"title": "Trained?"
13+
"advancedOptions": {
14+
"type": "object",
15+
"properties": {
16+
"enableFeatureX": { "type": "boolean" }
17+
},
18+
"if": {
19+
"properties": {"enableFeatureX": {"const": true}},
20+
"required": ["enableFeatureX"]
21+
},
22+
"then": {
23+
"properties": {
24+
"notetwo": {
25+
"type": "string",
26+
"title": "TEST"
27+
}
28+
}
29+
},
30+
"else": {
31+
"properties": {"":""}
32+
}
2633
}
27-
},
28-
"required": ["breed"]
34+
}
2935
},
3036
"else": {
3137
"properties": {
32-
"indoor": {
33-
"type": "boolean",
34-
"title": "Indoor Cat?"
35-
},
36-
"color": {
37-
"type": "string",
38-
"title": "Fur Color"
39-
}
40-
},
41-
"required": ["indoor"]
42-
},
43-
"type": "object"
38+
"note": { "type": "string" }
39+
}
40+
}
4441
}
45-
},
46-
"required": ["pet_type"]
42+
}
4743
}
5.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)