File tree 4 files changed +108
-0
lines changed
4 files changed +108
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/draft2020-12/format-assertion-false.json" ,
3
+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
4
+ "$vocabulary" : {
5
+ "https://json-schema.org/draft/2020-12/vocab/core" : true ,
6
+ "https://json-schema.org/draft/2020-12/vocab/format-assertion" : false
7
+ },
8
+ "allOf" : [
9
+ { "$ref" : " https://json-schema.org/draft/2020-12/schema/meta/core" },
10
+ { "$ref" : " https://json-schema.org/draft/2020-12/schema/meta/format-assertion" }
11
+ ]
12
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/draft2020-12/format-assertion-true.json" ,
3
+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
4
+ "$vocabulary" : {
5
+ "https://json-schema.org/draft/2020-12/vocab/core" : true ,
6
+ "https://json-schema.org/draft/2020-12/vocab/format-assertion" : true
7
+ },
8
+ "allOf" : [
9
+ { "$ref" : " https://json-schema.org/draft/2020-12/schema/meta/core" },
10
+ { "$ref" : " https://json-schema.org/draft/2020-12/schema/meta/format-assertion" }
11
+ ]
12
+ }
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "description" : " schema that uses custom metaschema with format-assertion: false" ,
4
+ "schema" : {
5
+ "$id" : " https://schema/using/format-assertion/false" ,
6
+ "$schema" : " http://localhost:1234/draft2020-12/format-assertion-false.json" ,
7
+ "format" : " ipv4"
8
+ },
9
+ "tests" : [
10
+ {
11
+ "description" : " format-assertion: false: valid string" ,
12
+ "data" : " 127.0.0.1" ,
13
+ "valid" : true
14
+ },
15
+ {
16
+ "description" : " format-assertion: false: invalid string" ,
17
+ "data" : " not-an-ipv4" ,
18
+ "valid" : false
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "description" : " schema that uses custom metaschema with format-assertion: true" ,
24
+ "schema" : {
25
+ "$id" : " https://schema/using/format-assertion/true" ,
26
+ "$schema" : " http://localhost:1234/draft2020-12/format-assertion-true.json" ,
27
+ "format" : " ipv4"
28
+ },
29
+ "tests" : [
30
+ {
31
+ "description" : " format-assertion: true: valid string" ,
32
+ "data" : " 127.0.0.1" ,
33
+ "valid" : true
34
+ },
35
+ {
36
+ "description" : " format-assertion: true: invalid string" ,
37
+ "data" : " not-an-ipv4" ,
38
+ "valid" : false
39
+ }
40
+ ]
41
+ }
42
+ ]
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "description" : " schema that uses custom metaschema with format-assertion: false" ,
4
+ "schema" : {
5
+ "$id" : " https://schema/using/format-assertion/false" ,
6
+ "$schema" : " http://localhost:1234/draft2020-12/format-assertion-false.json" ,
7
+ "format" : " ipv4"
8
+ },
9
+ "tests" : [
10
+ {
11
+ "description" : " format-assertion: false: valid string" ,
12
+ "data" : " 127.0.0.1" ,
13
+ "valid" : true
14
+ },
15
+ {
16
+ "description" : " format-assertion: false: invalid string" ,
17
+ "data" : " not-an-ipv4" ,
18
+ "valid" : false
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "description" : " schema that uses custom metaschema with format-assertion: true" ,
24
+ "schema" : {
25
+ "$id" : " https://schema/using/format-assertion/true" ,
26
+ "$schema" : " http://localhost:1234/draft2020-12/format-assertion-true.json" ,
27
+ "format" : " ipv4"
28
+ },
29
+ "tests" : [
30
+ {
31
+ "description" : " format-assertion: true: valid string" ,
32
+ "data" : " 127.0.0.1" ,
33
+ "valid" : true
34
+ },
35
+ {
36
+ "description" : " format-assertion: true: invalid string" ,
37
+ "data" : " not-an-ipv4" ,
38
+ "valid" : false
39
+ }
40
+ ]
41
+ }
42
+ ]
You can’t perform that action at this time.
0 commit comments