Skip to content

Commit 4e5649c

Browse files
committed
move tests to draft-next
1 parent 2f50e78 commit 4e5649c

File tree

2 files changed

+81
-81
lines changed

2 files changed

+81
-81
lines changed

tests/draft-next/dynamicRef.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,5 +484,86 @@
484484
"valid": true
485485
}
486486
]
487+
},
488+
{
489+
"description": "$dynamicAnchor inside propertyDependencies",
490+
"schema": {
491+
"$schema": "https://json-schema.org/draft/2020-12/schema",
492+
"$id": "http://localhost:1234/draft2020-12/dynamicanchor-in-propertydependencies.json",
493+
"$defs": {
494+
"inner": {
495+
"$id": "inner",
496+
"$dynamicAnchor": "foo",
497+
"type": "object",
498+
"additionalProperties": {
499+
"$dynamicRef": "#foo"
500+
}
501+
}
502+
},
503+
"propertyDependencies": {
504+
"expectedTypes": {
505+
"strings": {
506+
"$id": "east",
507+
"$dynamicAnchor": "foo",
508+
"type": "string",
509+
"$ref": "inner"
510+
},
511+
"integers": {
512+
"$id": "west",
513+
"$dynamicAnchor": "foo",
514+
"type": "integer",
515+
"$ref": "inner"
516+
}
517+
}
518+
}
519+
},
520+
"tests": [
521+
{
522+
"description": "expected strings - additional property as string is valid",
523+
"data": {
524+
"expectedTypes": "strings",
525+
"anotherProperty": "also a string"
526+
},
527+
"valid": true
528+
},
529+
{
530+
"description": "expected strings - additional property as not string is invalid",
531+
"data": {
532+
"expectedTypes": "strings",
533+
"anotherProperty": 42
534+
},
535+
"valid": false
536+
},
537+
{
538+
"description": "expected integers - additional property as integer is valid",
539+
"data": {
540+
"expectedTypes": "integers",
541+
"anotherProperty": 42
542+
},
543+
"valid": true
544+
},
545+
{
546+
"description": "expected integers - additional property as not integer is invalid",
547+
"data": {
548+
"expectedTypes": "integers",
549+
"anotherProperty": "a string"
550+
},
551+
"valid": false
552+
},
553+
{
554+
"description": "expected missing - additional property as an object is valid",
555+
"data": {
556+
"anotherProperty": {}
557+
},
558+
"valid": true
559+
},
560+
{
561+
"description": "expected missing - additional property as not object is invalid",
562+
"data": {
563+
"anotherProperty": 42
564+
},
565+
"valid": false
566+
}
567+
]
487568
}
488569
]

tests/draft2020-12/dynamicRef.json

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -631,86 +631,5 @@
631631
"valid": true
632632
}
633633
]
634-
},
635-
{
636-
"description": "$dynamicAnchor inside propertyDependencies",
637-
"schema": {
638-
"$schema": "https://json-schema.org/draft/2020-12/schema",
639-
"$id": "http://localhost:1234/draft2020-12/dynamicanchor-in-propertydependencies.json",
640-
"$defs": {
641-
"inner": {
642-
"$id": "inner",
643-
"$dynamicAnchor": "foo",
644-
"type": "object",
645-
"additionalProperties": {
646-
"$dynamicRef": "#foo"
647-
}
648-
}
649-
},
650-
"propertyDependencies": {
651-
"expectedTypes": {
652-
"strings": {
653-
"$id": "east",
654-
"$dynamicAnchor": "foo",
655-
"type": "string",
656-
"$ref": "inner"
657-
},
658-
"integers": {
659-
"$id": "west",
660-
"$dynamicAnchor": "foo",
661-
"type": "integer",
662-
"$ref": "inner"
663-
}
664-
}
665-
}
666-
},
667-
"tests": [
668-
{
669-
"description": "expected strings - additional property as string is valid",
670-
"data": {
671-
"expectedTypes": "strings",
672-
"anotherProperty": "also a string"
673-
},
674-
"valid": true
675-
},
676-
{
677-
"description": "expected strings - additional property as not string is invalid",
678-
"data": {
679-
"expectedTypes": "strings",
680-
"anotherProperty": 42
681-
},
682-
"valid": false
683-
},
684-
{
685-
"description": "expected integers - additional property as integer is valid",
686-
"data": {
687-
"expectedTypes": "integers",
688-
"anotherProperty": 42
689-
},
690-
"valid": true
691-
},
692-
{
693-
"description": "expected integers - additional property as not integer is invalid",
694-
"data": {
695-
"expectedTypes": "integers",
696-
"anotherProperty": "a string"
697-
},
698-
"valid": false
699-
},
700-
{
701-
"description": "expected missing - additional property as an object is valid",
702-
"data": {
703-
"anotherProperty": {}
704-
},
705-
"valid": true
706-
},
707-
{
708-
"description": "expected missing - additional property as not object is invalid",
709-
"data": {
710-
"anotherProperty": 42
711-
},
712-
"valid": false
713-
}
714-
]
715634
}
716635
]

0 commit comments

Comments
 (0)