Skip to content

Commit b08d7e6

Browse files
committed
Merge branch 'main' of github.com:geometryprocessing/simple-json-validator
2 parents b37743c + 8f0ae2f commit b08d7e6

File tree

2 files changed

+70
-11
lines changed

2 files changed

+70
-11
lines changed

data/default_rules.json

Lines changed: 69 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,35 +186,94 @@
186186
{
187187
"pointer": "/geometry/*/surface_selection/*",
188188
"type": "object",
189-
"required":["id"],
190-
"optional":["axis", "position","box", "relative"],
191-
"default": null
189+
"required":["id","box"],
190+
"optional":["relative"],
191+
"default": null,
192+
"typename": "box"
193+
},
194+
{
195+
"pointer": "/geometry/*/surface_selection/*",
196+
"type": "object",
197+
"required":["id","radius", "center"],
198+
"optional":["relative"],
199+
"default": null,
200+
"typename": "sphere"
201+
},
202+
{
203+
"pointer": "/geometry/*/surface_selection/*",
204+
"type": "object",
205+
"required":["id","point", "normal"],
206+
"optional":["relative", "offset"],
207+
"default": null,
208+
"typename": "plane"
209+
},
210+
{
211+
"pointer": "/geometry/*/surface_selection/*",
212+
"type": "object",
213+
"required":["id", "axis", "position"],
214+
"default": null,
215+
"typename": "axis"
192216
},
193217
{
194218
"pointer": "/geometry/*/surface_selection/*/id",
195219
"type": "int"
196220
},
221+
{
222+
"pointer": "/geometry/*/surface_selection/*/radius",
223+
"type": "float"
224+
},
225+
{
226+
"pointer": "/geometry/*/surface_selection/*/center",
227+
"type": "list",
228+
"min": 2,
229+
"max": 3
230+
},
231+
{
232+
"pointer": "/geometry/*/surface_selection/*/center/*",
233+
"type": "float"
234+
},
197235
{
198236
"pointer": "/geometry/*/surface_selection/*/axis",
199-
"type": "int",
200-
"default": null
237+
"type": "int"
238+
},
239+
{
240+
"pointer": "/geometry/*/surface_selection/*/offset",
241+
"type": "float"
201242
},
202243
{
203244
"pointer": "/geometry/*/surface_selection/*/position",
204-
"type": "float",
205-
"default": null
245+
"type": "float"
206246
},
207247
{
208248
"pointer": "/geometry/*/surface_selection/*/relative",
209249
"type": "bool",
210-
"default": "//TODO"
250+
"default": false
251+
},
252+
{
253+
"pointer": "/geometry/*/surface_selection/*/point",
254+
"type": "list",
255+
"min": 2,
256+
"max": 3
257+
},
258+
{
259+
"pointer": "/geometry/*/surface_selection/*/point/*",
260+
"type": "float"
261+
},
262+
{
263+
"pointer": "/geometry/*/surface_selection/*/normal",
264+
"type": "list",
265+
"min": 2,
266+
"max": 3
267+
},
268+
{
269+
"pointer": "/geometry/*/surface_selection/*/normal/*",
270+
"type": "float"
211271
},
212272
{
213273
"pointer": "/geometry/*/surface_selection/*/box",
214274
"type": "list",
215275
"min":2,
216-
"max":2,
217-
"default": [[],[]]
276+
"max":2
218277
},
219278
{
220279
"pointer": "/geometry/*/surface_selection/*/box/*",

tests/test_validator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ TEST_CASE("file_type", "[validator]")
126126

127127
sjv.cwd = std::filesystem::current_path();
128128
sjv.strict = true;
129-
129+
sjv.skip_file_check = false;
130130
b = sjv.verify_json(input,rules);
131131

132132
INFO(sjv.log2str());

0 commit comments

Comments
 (0)