Skip to content

Commit d524731

Browse files
confirm that the correct metaschema and json schema dialects are used
1 parent 2e386ef commit d524731

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/document-toplevel.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,19 @@ ERRORS
356356
version => '1.2.3',
357357
},
358358
jsonSchemaDialect => 'https://mymetaschema',
359-
paths => {},
359+
components => {
360+
schemas => {
361+
Foo => {
362+
maxLength => false, # this is a bad schema, but our custom dialect does not detect that
363+
},
364+
},
365+
},
360366
},
361367
metaschema_uri => DEFAULT_METASCHEMA, # '#meta' is now just {"type": ["object","boolean"]}
362368
);
363369
cmp_result([ $doc->errors ], [], 'no errors with a custom jsonSchemaDialect');
364370
is($doc->json_schema_dialect, 'https://mymetaschema', 'custom jsonSchemaDialect is saved in the document');
371+
is($doc->metaschema_uri, DEFAULT_METASCHEMA, 'custom metaschema is saved');
365372

366373
$js->add_document($doc);
367374
cmp_deeply(

0 commit comments

Comments
 (0)