summaryrefslogtreecommitdiff
path: root/json
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2021-08-24 15:36:42 +0100
committerJulian Berman <Julian@GrayVines.com>2021-08-24 15:36:42 +0100
commitd0b71d19bfd460cbf3abc98bacffb73f5624cc4b (patch)
tree62bdf780508b7f90f0fc620020a569794ba8ba57 /json
parent620677a3eda9957832859c9727140c03d606c810 (diff)
parentb5e545b0e0a3a614562293fd7755cd8d2283e8d2 (diff)
downloadjsonschema-d0b71d19bfd460cbf3abc98bacffb73f5624cc4b.tar.gz
Merge commit 'b5e545b0e0a3a614562293fd7755cd8d2283e8d2'
* commit 'b5e545b0e0a3a614562293fd7755cd8d2283e8d2': Squashed 'json/' changes from ab0b1ae71..20c1bb1d9
Diffstat (limited to 'json')
-rw-r--r--json/tests/draft-future/optional/format/date-time.json10
-rw-r--r--json/tests/draft-future/optional/format/date.json5
-rw-r--r--json/tests/draft-future/optional/format/duration.json5
-rw-r--r--json/tests/draft-future/optional/format/ipv4.json5
-rw-r--r--json/tests/draft-future/optional/format/ipv6.json10
-rw-r--r--json/tests/draft-future/optional/format/time.json10
-rw-r--r--json/tests/draft2019-09/optional/format/date-time.json10
-rw-r--r--json/tests/draft2019-09/optional/format/date.json5
-rw-r--r--json/tests/draft2019-09/optional/format/duration.json5
-rw-r--r--json/tests/draft2019-09/optional/format/ipv4.json5
-rw-r--r--json/tests/draft2019-09/optional/format/ipv6.json10
-rw-r--r--json/tests/draft2019-09/optional/format/time.json10
-rw-r--r--json/tests/draft2020-12/optional/format/date-time.json10
-rw-r--r--json/tests/draft2020-12/optional/format/date.json5
-rw-r--r--json/tests/draft2020-12/optional/format/duration.json5
-rw-r--r--json/tests/draft2020-12/optional/format/ipv4.json5
-rw-r--r--json/tests/draft2020-12/optional/format/ipv6.json10
-rw-r--r--json/tests/draft2020-12/optional/format/time.json10
-rw-r--r--json/tests/draft4/optional/format/date-time.json10
-rw-r--r--json/tests/draft4/optional/format/ipv4.json5
-rw-r--r--json/tests/draft4/optional/format/ipv6.json10
-rw-r--r--json/tests/draft6/optional/format/date-time.json10
-rw-r--r--json/tests/draft6/optional/format/ipv4.json5
-rw-r--r--json/tests/draft6/optional/format/ipv6.json10
-rw-r--r--json/tests/draft7/optional/format/date-time.json10
-rw-r--r--json/tests/draft7/optional/format/date.json5
-rw-r--r--json/tests/draft7/optional/format/ipv4.json5
-rw-r--r--json/tests/draft7/optional/format/ipv6.json10
-rw-r--r--json/tests/draft7/optional/format/time.json10
29 files changed, 225 insertions, 0 deletions
diff --git a/json/tests/draft-future/optional/format/date-time.json b/json/tests/draft-future/optional/format/date-time.json
index 900fcb7..5f911ef 100644
--- a/json/tests/draft-future/optional/format/date-time.json
+++ b/json/tests/draft-future/optional/format/date-time.json
@@ -57,6 +57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the date portion",
+ "data": "1963-06-1৪T00:00:00Z",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the time portion",
+ "data": "1963-06-11T0৪:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft-future/optional/format/date.json b/json/tests/draft-future/optional/format/date.json
index 00365fa..6cc2feb 100644
--- a/json/tests/draft-future/optional/format/date.json
+++ b/json/tests/draft-future/optional/format/date.json
@@ -182,6 +182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1963-06-1৪",
+ "valid": false
}
]
}
diff --git a/json/tests/draft-future/optional/format/duration.json b/json/tests/draft-future/optional/format/duration.json
index 816ca4a..eb33dbb 100644
--- a/json/tests/draft-future/optional/format/duration.json
+++ b/json/tests/draft-future/optional/format/duration.json
@@ -87,6 +87,11 @@
"description": "weeks cannot be combined with other units",
"data": "P1Y2W",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "P২Y",
+ "valid": false
}
]
}
diff --git a/json/tests/draft-future/optional/format/ipv4.json b/json/tests/draft-future/optional/format/ipv4.json
index e36a381..4d10927 100644
--- a/json/tests/draft-future/optional/format/ipv4.json
+++ b/json/tests/draft-future/optional/format/ipv4.json
@@ -43,6 +43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২7.0.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft-future/optional/format/ipv6.json b/json/tests/draft-future/optional/format/ipv6.json
index 2a08cb4..cf629c6 100644
--- a/json/tests/draft-future/optional/format/ipv6.json
+++ b/json/tests/draft-future/optional/format/ipv6.json
@@ -147,6 +147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1:2:3:4:5:6:7:৪",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the ipv4 portion also",
+ "data": "1:2::192.16৪.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft-future/optional/format/time.json b/json/tests/draft-future/optional/format/time.json
index 6a72765..0a8da0e 100644
--- a/json/tests/draft-future/optional/format/time.json
+++ b/json/tests/draft-future/optional/format/time.json
@@ -152,6 +152,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "01:01:01,1111",
"valid": false
+ },
+ {
+ "description": "no time offset",
+ "data": "12:00:00",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2019-09/optional/format/date-time.json b/json/tests/draft2019-09/optional/format/date-time.json
index 900fcb7..5f911ef 100644
--- a/json/tests/draft2019-09/optional/format/date-time.json
+++ b/json/tests/draft2019-09/optional/format/date-time.json
@@ -57,6 +57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the date portion",
+ "data": "1963-06-1৪T00:00:00Z",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the time portion",
+ "data": "1963-06-11T0৪:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2019-09/optional/format/date.json b/json/tests/draft2019-09/optional/format/date.json
index 00365fa..6cc2feb 100644
--- a/json/tests/draft2019-09/optional/format/date.json
+++ b/json/tests/draft2019-09/optional/format/date.json
@@ -182,6 +182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1963-06-1৪",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2019-09/optional/format/duration.json b/json/tests/draft2019-09/optional/format/duration.json
index 816ca4a..eb33dbb 100644
--- a/json/tests/draft2019-09/optional/format/duration.json
+++ b/json/tests/draft2019-09/optional/format/duration.json
@@ -87,6 +87,11 @@
"description": "weeks cannot be combined with other units",
"data": "P1Y2W",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "P২Y",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2019-09/optional/format/ipv4.json b/json/tests/draft2019-09/optional/format/ipv4.json
index e36a381..4d10927 100644
--- a/json/tests/draft2019-09/optional/format/ipv4.json
+++ b/json/tests/draft2019-09/optional/format/ipv4.json
@@ -43,6 +43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২7.0.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2019-09/optional/format/ipv6.json b/json/tests/draft2019-09/optional/format/ipv6.json
index 2a08cb4..cf629c6 100644
--- a/json/tests/draft2019-09/optional/format/ipv6.json
+++ b/json/tests/draft2019-09/optional/format/ipv6.json
@@ -147,6 +147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1:2:3:4:5:6:7:৪",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the ipv4 portion also",
+ "data": "1:2::192.16৪.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2019-09/optional/format/time.json b/json/tests/draft2019-09/optional/format/time.json
index 6a72765..0a8da0e 100644
--- a/json/tests/draft2019-09/optional/format/time.json
+++ b/json/tests/draft2019-09/optional/format/time.json
@@ -152,6 +152,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "01:01:01,1111",
"valid": false
+ },
+ {
+ "description": "no time offset",
+ "data": "12:00:00",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2020-12/optional/format/date-time.json b/json/tests/draft2020-12/optional/format/date-time.json
index 900fcb7..5f911ef 100644
--- a/json/tests/draft2020-12/optional/format/date-time.json
+++ b/json/tests/draft2020-12/optional/format/date-time.json
@@ -57,6 +57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the date portion",
+ "data": "1963-06-1৪T00:00:00Z",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the time portion",
+ "data": "1963-06-11T0৪:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2020-12/optional/format/date.json b/json/tests/draft2020-12/optional/format/date.json
index 00365fa..6cc2feb 100644
--- a/json/tests/draft2020-12/optional/format/date.json
+++ b/json/tests/draft2020-12/optional/format/date.json
@@ -182,6 +182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1963-06-1৪",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2020-12/optional/format/duration.json b/json/tests/draft2020-12/optional/format/duration.json
index 816ca4a..eb33dbb 100644
--- a/json/tests/draft2020-12/optional/format/duration.json
+++ b/json/tests/draft2020-12/optional/format/duration.json
@@ -87,6 +87,11 @@
"description": "weeks cannot be combined with other units",
"data": "P1Y2W",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "P২Y",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2020-12/optional/format/ipv4.json b/json/tests/draft2020-12/optional/format/ipv4.json
index e36a381..4d10927 100644
--- a/json/tests/draft2020-12/optional/format/ipv4.json
+++ b/json/tests/draft2020-12/optional/format/ipv4.json
@@ -43,6 +43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২7.0.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2020-12/optional/format/ipv6.json b/json/tests/draft2020-12/optional/format/ipv6.json
index 2a08cb4..cf629c6 100644
--- a/json/tests/draft2020-12/optional/format/ipv6.json
+++ b/json/tests/draft2020-12/optional/format/ipv6.json
@@ -147,6 +147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1:2:3:4:5:6:7:৪",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the ipv4 portion also",
+ "data": "1:2::192.16৪.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft2020-12/optional/format/time.json b/json/tests/draft2020-12/optional/format/time.json
index 6a72765..0a8da0e 100644
--- a/json/tests/draft2020-12/optional/format/time.json
+++ b/json/tests/draft2020-12/optional/format/time.json
@@ -152,6 +152,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "01:01:01,1111",
"valid": false
+ },
+ {
+ "description": "no time offset",
+ "data": "12:00:00",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft4/optional/format/date-time.json b/json/tests/draft4/optional/format/date-time.json
index 900fcb7..5f911ef 100644
--- a/json/tests/draft4/optional/format/date-time.json
+++ b/json/tests/draft4/optional/format/date-time.json
@@ -57,6 +57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the date portion",
+ "data": "1963-06-1৪T00:00:00Z",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the time portion",
+ "data": "1963-06-11T0৪:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft4/optional/format/ipv4.json b/json/tests/draft4/optional/format/ipv4.json
index e36a381..4d10927 100644
--- a/json/tests/draft4/optional/format/ipv4.json
+++ b/json/tests/draft4/optional/format/ipv4.json
@@ -43,6 +43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২7.0.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft4/optional/format/ipv6.json b/json/tests/draft4/optional/format/ipv6.json
index 2a08cb4..cf629c6 100644
--- a/json/tests/draft4/optional/format/ipv6.json
+++ b/json/tests/draft4/optional/format/ipv6.json
@@ -147,6 +147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1:2:3:4:5:6:7:৪",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the ipv4 portion also",
+ "data": "1:2::192.16৪.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft6/optional/format/date-time.json b/json/tests/draft6/optional/format/date-time.json
index a6320a9..2dd214a 100644
--- a/json/tests/draft6/optional/format/date-time.json
+++ b/json/tests/draft6/optional/format/date-time.json
@@ -62,6 +62,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the date portion",
+ "data": "1963-06-1৪T00:00:00Z",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the time portion",
+ "data": "1963-06-11T0৪:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft6/optional/format/ipv4.json b/json/tests/draft6/optional/format/ipv4.json
index e36a381..4d10927 100644
--- a/json/tests/draft6/optional/format/ipv4.json
+++ b/json/tests/draft6/optional/format/ipv4.json
@@ -43,6 +43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২7.0.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft6/optional/format/ipv6.json b/json/tests/draft6/optional/format/ipv6.json
index 2a08cb4..cf629c6 100644
--- a/json/tests/draft6/optional/format/ipv6.json
+++ b/json/tests/draft6/optional/format/ipv6.json
@@ -147,6 +147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1:2:3:4:5:6:7:৪",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the ipv4 portion also",
+ "data": "1:2::192.16৪.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft7/optional/format/date-time.json b/json/tests/draft7/optional/format/date-time.json
index 900fcb7..5f911ef 100644
--- a/json/tests/draft7/optional/format/date-time.json
+++ b/json/tests/draft7/optional/format/date-time.json
@@ -57,6 +57,16 @@
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the date portion",
+ "data": "1963-06-1৪T00:00:00Z",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the time portion",
+ "data": "1963-06-11T0৪:00:00Z",
+ "valid": false
}
]
}
diff --git a/json/tests/draft7/optional/format/date.json b/json/tests/draft7/optional/format/date.json
index 00365fa..6cc2feb 100644
--- a/json/tests/draft7/optional/format/date.json
+++ b/json/tests/draft7/optional/format/date.json
@@ -182,6 +182,11 @@
"description": "2020 is a leap year",
"data": "2020-02-29",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1963-06-1৪",
+ "valid": false
}
]
}
diff --git a/json/tests/draft7/optional/format/ipv4.json b/json/tests/draft7/optional/format/ipv4.json
index e36a381..4d10927 100644
--- a/json/tests/draft7/optional/format/ipv4.json
+++ b/json/tests/draft7/optional/format/ipv4.json
@@ -43,6 +43,11 @@
"description": "value without leading zero is valid",
"data": "87.10.0.1",
"valid": true
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২7.0.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft7/optional/format/ipv6.json b/json/tests/draft7/optional/format/ipv6.json
index 2a08cb4..cf629c6 100644
--- a/json/tests/draft7/optional/format/ipv6.json
+++ b/json/tests/draft7/optional/format/ipv6.json
@@ -147,6 +147,16 @@
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1:2:3:4:5:6:7:৪",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected in the ipv4 portion also",
+ "data": "1:2::192.16৪.0.1",
+ "valid": false
}
]
}
diff --git a/json/tests/draft7/optional/format/time.json b/json/tests/draft7/optional/format/time.json
index 6a72765..0a8da0e 100644
--- a/json/tests/draft7/optional/format/time.json
+++ b/json/tests/draft7/optional/format/time.json
@@ -152,6 +152,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "01:01:01,1111",
"valid": false
+ },
+ {
+ "description": "no time offset",
+ "data": "12:00:00",
+ "valid": false
+ },
+ {
+ "description": "non-ascii digits should be rejected",
+ "data": "1২:00:00Z",
+ "valid": false
}
]
}