summaryrefslogtreecommitdiff
path: root/json/tests/draft2019-09/optional/format
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2019-09/optional/format')
-rw-r--r--json/tests/draft2019-09/optional/format/date-time.json133
-rw-r--r--json/tests/draft2019-09/optional/format/date.json223
-rw-r--r--json/tests/draft2019-09/optional/format/duration.json128
-rw-r--r--json/tests/draft2019-09/optional/format/email.json83
-rw-r--r--json/tests/draft2019-09/optional/format/hostname.json98
-rw-r--r--json/tests/draft2019-09/optional/format/idn-email.json58
-rw-r--r--json/tests/draft2019-09/optional/format/idn-hostname.json304
-rw-r--r--json/tests/draft2019-09/optional/format/ipv4.json84
-rw-r--r--json/tests/draft2019-09/optional/format/ipv6.json208
-rw-r--r--json/tests/draft2019-09/optional/format/iri-reference.json73
-rw-r--r--json/tests/draft2019-09/optional/format/iri.json83
-rw-r--r--json/tests/draft2019-09/optional/format/json-pointer.json198
-rw-r--r--json/tests/draft2019-09/optional/format/regex.json48
-rw-r--r--json/tests/draft2019-09/optional/format/relative-json-pointer.json83
-rw-r--r--json/tests/draft2019-09/optional/format/time.json198
-rw-r--r--json/tests/draft2019-09/optional/format/unknown.json43
-rw-r--r--json/tests/draft2019-09/optional/format/uri-reference.json73
-rw-r--r--json/tests/draft2019-09/optional/format/uri-template.json58
-rw-r--r--json/tests/draft2019-09/optional/format/uri.json108
-rw-r--r--json/tests/draft2019-09/optional/format/uuid.json85
20 files changed, 0 insertions, 2369 deletions
diff --git a/json/tests/draft2019-09/optional/format/date-time.json b/json/tests/draft2019-09/optional/format/date-time.json
deleted file mode 100644
index f4f9933..0000000
--- a/json/tests/draft2019-09/optional/format/date-time.json
+++ /dev/null
@@ -1,133 +0,0 @@
-[
- {
- "description": "validation of date-time strings",
- "schema": { "format": "date-time" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid date-time string",
- "data": "1963-06-19T08:30:06.283185Z",
- "valid": true
- },
- {
- "description": "a valid date-time string without second fraction",
- "data": "1963-06-19T08:30:06Z",
- "valid": true
- },
- {
- "description": "a valid date-time string with plus offset",
- "data": "1937-01-01T12:00:27.87+00:20",
- "valid": true
- },
- {
- "description": "a valid date-time string with minus offset",
- "data": "1990-12-31T15:59:50.123-08:00",
- "valid": true
- },
- {
- "description": "a valid date-time with a leap second, UTC",
- "data": "1998-12-31T23:59:60Z",
- "valid": true
- },
- {
- "description": "a valid date-time with a leap second, with minus offset",
- "data": "1998-12-31T15:59:60.123-08:00",
- "valid": true
- },
- {
- "description": "an invalid date-time past leap second, UTC",
- "data": "1998-12-31T23:59:61Z",
- "valid": false
- },
- {
- "description": "an invalid date-time with leap second on a wrong minute, UTC",
- "data": "1998-12-31T23:58:60Z",
- "valid": false
- },
- {
- "description": "an invalid date-time with leap second on a wrong hour, UTC",
- "data": "1998-12-31T22:59:60Z",
- "valid": false
- },
- {
- "description": "an invalid day in date-time string",
- "data": "1990-02-31T15:59:59.123-08:00",
- "valid": false
- },
- {
- "description": "an invalid offset in date-time string",
- "data": "1990-12-31T15:59:59-24:00",
- "valid": false
- },
- {
- "description": "an invalid closing Z after time-zone offset",
- "data": "1963-06-19T08:30:06.28123+01:00Z",
- "valid": false
- },
- {
- "description": "an invalid date-time string",
- "data": "06/19/1963 08:30:06 PST",
- "valid": false
- },
- {
- "description": "case-insensitive T and Z",
- "data": "1963-06-19t08:30:06.283185z",
- "valid": true
- },
- {
- "description": "only RFC3339 not all of ISO 8601 are valid",
- "data": "2013-350T01:01:01",
- "valid": false
- },
- {
- "description": "invalid non-padded month dates",
- "data": "1963-6-19T08:30:06.283185Z",
- "valid": false
- },
- {
- "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
deleted file mode 100644
index b4f61ee..0000000
--- a/json/tests/draft2019-09/optional/format/date.json
+++ /dev/null
@@ -1,223 +0,0 @@
-[
- {
- "description": "validation of date strings",
- "schema": { "format": "date" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid date string",
- "data": "1963-06-19",
- "valid": true
- },
- {
- "description": "a valid date string with 31 days in January",
- "data": "2020-01-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in January",
- "data": "2020-01-32",
- "valid": false
- },
- {
- "description": "a valid date string with 28 days in February (normal)",
- "data": "2021-02-28",
- "valid": true
- },
- {
- "description": "a invalid date string with 29 days in February (normal)",
- "data": "2021-02-29",
- "valid": false
- },
- {
- "description": "a valid date string with 29 days in February (leap)",
- "data": "2020-02-29",
- "valid": true
- },
- {
- "description": "a invalid date string with 30 days in February (leap)",
- "data": "2020-02-30",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in March",
- "data": "2020-03-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in March",
- "data": "2020-03-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in April",
- "data": "2020-04-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in April",
- "data": "2020-04-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in May",
- "data": "2020-05-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in May",
- "data": "2020-05-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in June",
- "data": "2020-06-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in June",
- "data": "2020-06-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in July",
- "data": "2020-07-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in July",
- "data": "2020-07-32",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in August",
- "data": "2020-08-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in August",
- "data": "2020-08-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in September",
- "data": "2020-09-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in September",
- "data": "2020-09-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in October",
- "data": "2020-10-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in October",
- "data": "2020-10-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in November",
- "data": "2020-11-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in November",
- "data": "2020-11-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in December",
- "data": "2020-12-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in December",
- "data": "2020-12-32",
- "valid": false
- },
- {
- "description": "a invalid date string with invalid month",
- "data": "2020-13-01",
- "valid": false
- },
- {
- "description": "an invalid date string",
- "data": "06/19/1963",
- "valid": false
- },
- {
- "description": "only RFC3339 not all of ISO 8601 are valid",
- "data": "2013-350",
- "valid": false
- },
- {
- "description": "non-padded month dates are not valid",
- "data": "1998-1-20",
- "valid": false
- },
- {
- "description": "non-padded day dates are not valid",
- "data": "1998-01-1",
- "valid": false
- },
- {
- "description": "invalid month",
- "data": "1998-13-01",
- "valid": false
- },
- {
- "description": "invalid month-day combination",
- "data": "1998-04-31",
- "valid": false
- },
- {
- "description": "2021 is not a leap year",
- "data": "2021-02-29",
- "valid": false
- },
- {
- "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
deleted file mode 100644
index 741348a..0000000
--- a/json/tests/draft2019-09/optional/format/duration.json
+++ /dev/null
@@ -1,128 +0,0 @@
-[
- {
- "description": "validation of duration strings",
- "schema": { "format": "duration" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid duration string",
- "data": "P4DT12H30M5S",
- "valid": true
- },
- {
- "description": "an invalid duration string",
- "data": "PT1D",
- "valid": false
- },
- {
- "description": "no elements present",
- "data": "P",
- "valid": false
- },
- {
- "description": "no time elements present",
- "data": "P1YT",
- "valid": false
- },
- {
- "description": "no date or time elements present",
- "data": "PT",
- "valid": false
- },
- {
- "description": "elements out of order",
- "data": "P2D1Y",
- "valid": false
- },
- {
- "description": "missing time separator",
- "data": "P1D2H",
- "valid": false
- },
- {
- "description": "time element in the date position",
- "data": "P2S",
- "valid": false
- },
- {
- "description": "four years duration",
- "data": "P4Y",
- "valid": true
- },
- {
- "description": "zero time, in seconds",
- "data": "PT0S",
- "valid": true
- },
- {
- "description": "zero time, in days",
- "data": "P0D",
- "valid": true
- },
- {
- "description": "one month duration",
- "data": "P1M",
- "valid": true
- },
- {
- "description": "one minute duration",
- "data": "PT1M",
- "valid": true
- },
- {
- "description": "one and a half days, in hours",
- "data": "PT36H",
- "valid": true
- },
- {
- "description": "one and a half days, in days and hours",
- "data": "P1DT12H",
- "valid": true
- },
- {
- "description": "two weeks",
- "data": "P2W",
- "valid": true
- },
- {
- "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/email.json b/json/tests/draft2019-09/optional/format/email.json
deleted file mode 100644
index d6761a4..0000000
--- a/json/tests/draft2019-09/optional/format/email.json
+++ /dev/null
@@ -1,83 +0,0 @@
-[
- {
- "description": "validation of e-mail addresses",
- "schema": { "format": "email" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid e-mail address",
- "data": "joe.bloggs@example.com",
- "valid": true
- },
- {
- "description": "an invalid e-mail address",
- "data": "2962",
- "valid": false
- },
- {
- "description": "tilde in local part is valid",
- "data": "te~st@example.com",
- "valid": true
- },
- {
- "description": "tilde before local part is valid",
- "data": "~test@example.com",
- "valid": true
- },
- {
- "description": "tilde after local part is valid",
- "data": "test~@example.com",
- "valid": true
- },
- {
- "description": "dot before local part is not valid",
- "data": ".test@example.com",
- "valid": false
- },
- {
- "description": "dot after local part is not valid",
- "data": "test.@example.com",
- "valid": false
- },
- {
- "description": "two separated dots inside local part are valid",
- "data": "te.s.t@example.com",
- "valid": true
- },
- {
- "description": "two subsequent dots inside local part are not valid",
- "data": "te..st@example.com",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/hostname.json b/json/tests/draft2019-09/optional/format/hostname.json
deleted file mode 100644
index 8a67fda..0000000
--- a/json/tests/draft2019-09/optional/format/hostname.json
+++ /dev/null
@@ -1,98 +0,0 @@
-[
- {
- "description": "validation of host names",
- "schema": { "format": "hostname" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid host name",
- "data": "www.example.com",
- "valid": true
- },
- {
- "description": "a valid punycoded IDN hostname",
- "data": "xn--4gbwdl.xn--wgbh1c",
- "valid": true
- },
- {
- "description": "a host name starting with an illegal character",
- "data": "-a-host-name-that-starts-with--",
- "valid": false
- },
- {
- "description": "a host name containing illegal characters",
- "data": "not_a_valid_host_name",
- "valid": false
- },
- {
- "description": "a host name with a component too long",
- "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
- "valid": false
- },
- {
- "description": "starts with hyphen",
- "data": "-hostname",
- "valid": false
- },
- {
- "description": "ends with hyphen",
- "data": "hostname-",
- "valid": false
- },
- {
- "description": "starts with underscore",
- "data": "_hostname",
- "valid": false
- },
- {
- "description": "ends with underscore",
- "data": "hostname_",
- "valid": false
- },
- {
- "description": "contains underscore",
- "data": "host_name",
- "valid": false
- },
- {
- "description": "maximum label length",
- "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com",
- "valid": true
- },
- {
- "description": "exceeds maximum label length",
- "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/idn-email.json b/json/tests/draft2019-09/optional/format/idn-email.json
deleted file mode 100644
index 6e21374..0000000
--- a/json/tests/draft2019-09/optional/format/idn-email.json
+++ /dev/null
@@ -1,58 +0,0 @@
-[
- {
- "description": "validation of an internationalized e-mail addresses",
- "schema": { "format": "idn-email" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid idn e-mail (example@example.test in Hangul)",
- "data": "실례@실례.테스트",
- "valid": true
- },
- {
- "description": "an invalid idn e-mail address",
- "data": "2962",
- "valid": false
- },
- {
- "description": "a valid e-mail address",
- "data": "joe.bloggs@example.com",
- "valid": true
- },
- {
- "description": "an invalid e-mail address",
- "data": "2962",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/idn-hostname.json b/json/tests/draft2019-09/optional/format/idn-hostname.json
deleted file mode 100644
index 6c8f86a..0000000
--- a/json/tests/draft2019-09/optional/format/idn-hostname.json
+++ /dev/null
@@ -1,304 +0,0 @@
-[
- {
- "description": "validation of internationalized host names",
- "schema": { "format": "idn-hostname" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid host name (example.test in Hangul)",
- "data": "실례.테스트",
- "valid": true
- },
- {
- "description": "illegal first char U+302E Hangul single dot tone mark",
- "data": "〮실례.테스트",
- "valid": false
- },
- {
- "description": "contains illegal char U+302E Hangul single dot tone mark",
- "data": "실〮례.테스트",
- "valid": false
- },
- {
- "description": "a host name with a component too long",
- "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트",
- "valid": false
- },
- {
- "description": "invalid label, correct Punycode",
- "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1",
- "data": "-> $1.00 <--",
- "valid": false
- },
- {
- "description": "valid Chinese Punycode",
- "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4",
- "data": "xn--ihqwcrb4cv8a8dqg056pqjye",
- "valid": true
- },
- {
- "description": "invalid Punycode",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1",
- "data": "xn--X",
- "valid": false
- },
- {
- "description": "U-label contains \"--\" in the 3rd and 4th position",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1",
- "data": "XN--aa---o47jg78q",
- "valid": false
- },
- {
- "description": "U-label starts with a dash",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
- "data": "-hello",
- "valid": false
- },
- {
- "description": "U-label ends with a dash",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
- "data": "hello-",
- "valid": false
- },
- {
- "description": "U-label starts and ends with a dash",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
- "data": "-hello-",
- "valid": false
- },
- {
- "description": "Begins with a Spacing Combining Mark",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
- "data": "\u0903hello",
- "valid": false
- },
- {
- "description": "Begins with a Nonspacing Mark",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
- "data": "\u0300hello",
- "valid": false
- },
- {
- "description": "Begins with an Enclosing Mark",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
- "data": "\u0488hello",
- "valid": false
- },
- {
- "description": "Exceptions that are PVALID, left-to-right chars",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6",
- "data": "\u00df\u03c2\u0f0b\u3007",
- "valid": true
- },
- {
- "description": "Exceptions that are PVALID, right-to-left chars",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6",
- "data": "\u06fd\u06fe",
- "valid": true
- },
- {
- "description": "Exceptions that are DISALLOWED, right-to-left chars",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6",
- "data": "\u0640\u07fa",
- "valid": false
- },
- {
- "description": "Exceptions that are DISALLOWED, left-to-right chars",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start",
- "data": "\u3031\u3032\u3033\u3034\u3035\u302e\u302f\u303b",
- "valid": false
- },
- {
- "description": "MIDDLE DOT with no preceding 'l'",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
- "data": "a\u00b7l",
- "valid": false
- },
- {
- "description": "MIDDLE DOT with nothing preceding",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
- "data": "\u00b7l",
- "valid": false
- },
- {
- "description": "MIDDLE DOT with no following 'l'",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
- "data": "l\u00b7a",
- "valid": false
- },
- {
- "description": "MIDDLE DOT with nothing following",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
- "data": "l\u00b7",
- "valid": false
- },
- {
- "description": "MIDDLE DOT with surrounding 'l's",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3",
- "data": "l\u00b7l",
- "valid": true
- },
- {
- "description": "Greek KERAIA not followed by Greek",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4",
- "data": "\u03b1\u0375S",
- "valid": false
- },
- {
- "description": "Greek KERAIA not followed by anything",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4",
- "data": "\u03b1\u0375",
- "valid": false
- },
- {
- "description": "Greek KERAIA followed by Greek",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4",
- "data": "\u03b1\u0375\u03b2",
- "valid": true
- },
- {
- "description": "Hebrew GERESH not preceded by Hebrew",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5",
- "data": "A\u05f3\u05d1",
- "valid": false
- },
- {
- "description": "Hebrew GERESH not preceded by anything",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5",
- "data": "\u05f3\u05d1",
- "valid": false
- },
- {
- "description": "Hebrew GERESH preceded by Hebrew",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5",
- "data": "\u05d0\u05f3\u05d1",
- "valid": true
- },
- {
- "description": "Hebrew GERSHAYIM not preceded by Hebrew",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6",
- "data": "A\u05f4\u05d1",
- "valid": false
- },
- {
- "description": "Hebrew GERSHAYIM not preceded by anything",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6",
- "data": "\u05f4\u05d1",
- "valid": false
- },
- {
- "description": "Hebrew GERSHAYIM preceded by Hebrew",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6",
- "data": "\u05d0\u05f4\u05d1",
- "valid": true
- },
- {
- "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
- "data": "def\u30fbabc",
- "valid": false
- },
- {
- "description": "KATAKANA MIDDLE DOT with no other characters",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
- "data": "\u30fb",
- "valid": false
- },
- {
- "description": "KATAKANA MIDDLE DOT with Hiragana",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
- "data": "\u30fb\u3041",
- "valid": true
- },
- {
- "description": "KATAKANA MIDDLE DOT with Katakana",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
- "data": "\u30fb\u30a1",
- "valid": true
- },
- {
- "description": "KATAKANA MIDDLE DOT with Han",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7",
- "data": "\u30fb\u4e08",
- "valid": true
- },
- {
- "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8",
- "data": "\u0660\u06f0",
- "valid": false
- },
- {
- "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8",
- "data": "\u0628\u0660\u0628",
- "valid": true
- },
- {
- "description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9",
- "data": "\u06f00",
- "valid": true
- },
- {
- "description": "ZERO WIDTH JOINER not preceded by Virama",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf",
- "data": "\u0915\u200d\u0937",
- "valid": false
- },
- {
- "description": "ZERO WIDTH JOINER not preceded by anything",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf",
- "data": "\u200d\u0937",
- "valid": false
- },
- {
- "description": "ZERO WIDTH JOINER preceded by Virama",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf",
- "data": "\u0915\u094d\u200d\u0937",
- "valid": true
- },
- {
- "description": "ZERO WIDTH NON-JOINER preceded by Virama",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1",
- "data": "\u0915\u094d\u200c\u0937",
- "valid": true
- },
- {
- "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp",
- "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement",
- "data": "\u0628\u064a\u200c\u0628\u064a",
- "valid": true
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/ipv4.json b/json/tests/draft2019-09/optional/format/ipv4.json
deleted file mode 100644
index 6b166c7..0000000
--- a/json/tests/draft2019-09/optional/format/ipv4.json
+++ /dev/null
@@ -1,84 +0,0 @@
-[
- {
- "description": "validation of IP addresses",
- "schema": { "format": "ipv4" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid IP address",
- "data": "192.168.0.1",
- "valid": true
- },
- {
- "description": "an IP address with too many components",
- "data": "127.0.0.0.1",
- "valid": false
- },
- {
- "description": "an IP address with out-of-range values",
- "data": "256.256.256.256",
- "valid": false
- },
- {
- "description": "an IP address without 4 components",
- "data": "127.0",
- "valid": false
- },
- {
- "description": "an IP address as an integer",
- "data": "0x7f000001",
- "valid": false
- },
- {
- "description": "an IP address as an integer (decimal)",
- "data": "2130706433",
- "valid": false
- },
- {
- "description": "leading zeroes should be rejected, as they are treated as octals",
- "comment": "see https://sick.codes/universal-netmask-npm-package-used-by-270000-projects-vulnerable-to-octal-input-data-server-side-request-forgery-remote-file-inclusion-local-file-inclusion-and-more-cve-2021-28918/",
- "data": "087.10.0.1",
- "valid": false
- },
- {
- "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
deleted file mode 100644
index 6379927..0000000
--- a/json/tests/draft2019-09/optional/format/ipv6.json
+++ /dev/null
@@ -1,208 +0,0 @@
-[
- {
- "description": "validation of IPv6 addresses",
- "schema": { "format": "ipv6" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid IPv6 address",
- "data": "::1",
- "valid": true
- },
- {
- "description": "an IPv6 address with out-of-range values",
- "data": "12345::",
- "valid": false
- },
- {
- "description": "trailing 4 hex symbols is valid",
- "data": "::abef",
- "valid": true
- },
- {
- "description": "trailing 5 hex symbols is invalid",
- "data": "::abcef",
- "valid": false
- },
- {
- "description": "an IPv6 address with too many components",
- "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1",
- "valid": false
- },
- {
- "description": "an IPv6 address containing illegal characters",
- "data": "::laptop",
- "valid": false
- },
- {
- "description": "no digits is valid",
- "data": "::",
- "valid": true
- },
- {
- "description": "leading colons is valid",
- "data": "::42:ff:1",
- "valid": true
- },
- {
- "description": "trailing colons is valid",
- "data": "d6::",
- "valid": true
- },
- {
- "description": "missing leading octet is invalid",
- "data": ":2:3:4:5:6:7:8",
- "valid": false
- },
- {
- "description": "missing trailing octet is invalid",
- "data": "1:2:3:4:5:6:7:",
- "valid": false
- },
- {
- "description": "missing leading octet with omitted octets later",
- "data": ":2:3:4::8",
- "valid": false
- },
- {
- "description": "single set of double colons in the middle is valid",
- "data": "1:d6::42",
- "valid": true
- },
- {
- "description": "two sets of double colons is invalid",
- "data": "1::d6::42",
- "valid": false
- },
- {
- "description": "mixed format with the ipv4 section as decimal octets",
- "data": "1::d6:192.168.0.1",
- "valid": true
- },
- {
- "description": "mixed format with double colons between the sections",
- "data": "1:2::192.168.0.1",
- "valid": true
- },
- {
- "description": "mixed format with ipv4 section with octet out of range",
- "data": "1::2:192.168.256.1",
- "valid": false
- },
- {
- "description": "mixed format with ipv4 section with a hex octet",
- "data": "1::2:192.168.ff.1",
- "valid": false
- },
- {
- "description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
- "data": "::ffff:192.168.0.1",
- "valid": true
- },
- {
- "description": "triple colons is invalid",
- "data": "1:2:3:4:5:::8",
- "valid": false
- },
- {
- "description": "8 octets",
- "data": "1:2:3:4:5:6:7:8",
- "valid": true
- },
- {
- "description": "insufficient octets without double colons",
- "data": "1:2:3:4:5:6:7",
- "valid": false
- },
- {
- "description": "no colons is invalid",
- "data": "1",
- "valid": false
- },
- {
- "description": "ipv4 is not ipv6",
- "data": "127.0.0.1",
- "valid": false
- },
- {
- "description": "ipv4 segment must have 4 octets",
- "data": "1:2:3:4:1.2.3",
- "valid": false
- },
- {
- "description": "leading whitespace is invalid",
- "data": " ::1",
- "valid": false
- },
- {
- "description": "trailing whitespace is invalid",
- "data": "::1 ",
- "valid": false
- },
- {
- "description": "netmask is not a part of ipv6 address",
- "data": "fe80::/64",
- "valid": false
- },
- {
- "description": "zone id is not a part of ipv6 address",
- "data": "fe80::a%eth1",
- "valid": false
- },
- {
- "description": "a long valid ipv6",
- "data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
- "valid": true
- },
- {
- "description": "a long invalid ipv6, below length limit, first",
- "data": "100:100:100:100:100:100:255.255.255.255.255",
- "valid": false
- },
- {
- "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/iri-reference.json b/json/tests/draft2019-09/optional/format/iri-reference.json
deleted file mode 100644
index c6b4c22..0000000
--- a/json/tests/draft2019-09/optional/format/iri-reference.json
+++ /dev/null
@@ -1,73 +0,0 @@
-[
- {
- "description": "validation of IRI References",
- "schema": { "format": "iri-reference" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid IRI",
- "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
- "valid": true
- },
- {
- "description": "a valid protocol-relative IRI Reference",
- "data": "//ƒøø.ßår/?∂éœ=πîx#πîüx",
- "valid": true
- },
- {
- "description": "a valid relative IRI Reference",
- "data": "/âππ",
- "valid": true
- },
- {
- "description": "an invalid IRI Reference",
- "data": "\\\\WINDOWS\\filëßåré",
- "valid": false
- },
- {
- "description": "a valid IRI Reference",
- "data": "âππ",
- "valid": true
- },
- {
- "description": "a valid IRI fragment",
- "data": "#ƒrägmênt",
- "valid": true
- },
- {
- "description": "an invalid IRI fragment",
- "data": "#ƒräg\\mênt",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/iri.json b/json/tests/draft2019-09/optional/format/iri.json
deleted file mode 100644
index a0d12ae..0000000
--- a/json/tests/draft2019-09/optional/format/iri.json
+++ /dev/null
@@ -1,83 +0,0 @@
-[
- {
- "description": "validation of IRIs",
- "schema": { "format": "iri" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid IRI with anchor tag",
- "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
- "valid": true
- },
- {
- "description": "a valid IRI with anchor tag and parentheses",
- "data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1",
- "valid": true
- },
- {
- "description": "a valid IRI with URL-encoded stuff",
- "data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff",
- "valid": true
- },
- {
- "description": "a valid IRI with many special characters",
- "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
- "valid": true
- },
- {
- "description": "a valid IRI based on IPv6",
- "data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]",
- "valid": true
- },
- {
- "description": "an invalid IRI based on IPv6",
- "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
- "valid": false
- },
- {
- "description": "an invalid relative IRI Reference",
- "data": "/abc",
- "valid": false
- },
- {
- "description": "an invalid IRI",
- "data": "\\\\WINDOWS\\filëßåré",
- "valid": false
- },
- {
- "description": "an invalid IRI though valid IRI reference",
- "data": "âππ",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/json-pointer.json b/json/tests/draft2019-09/optional/format/json-pointer.json
deleted file mode 100644
index a0346b5..0000000
--- a/json/tests/draft2019-09/optional/format/json-pointer.json
+++ /dev/null
@@ -1,198 +0,0 @@
-[
- {
- "description": "validation of JSON-pointers (JSON String Representation)",
- "schema": { "format": "json-pointer" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid JSON-pointer",
- "data": "/foo/bar~0/baz~1/%a",
- "valid": true
- },
- {
- "description": "not a valid JSON-pointer (~ not escaped)",
- "data": "/foo/bar~",
- "valid": false
- },
- {
- "description": "valid JSON-pointer with empty segment",
- "data": "/foo//bar",
- "valid": true
- },
- {
- "description": "valid JSON-pointer with the last empty segment",
- "data": "/foo/bar/",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #1",
- "data": "",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #2",
- "data": "/foo",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #3",
- "data": "/foo/0",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #4",
- "data": "/",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #5",
- "data": "/a~1b",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #6",
- "data": "/c%d",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #7",
- "data": "/e^f",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #8",
- "data": "/g|h",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #9",
- "data": "/i\\j",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #10",
- "data": "/k\"l",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #11",
- "data": "/ ",
- "valid": true
- },
- {
- "description": "valid JSON-pointer as stated in RFC 6901 #12",
- "data": "/m~0n",
- "valid": true
- },
- {
- "description": "valid JSON-pointer used adding to the last array position",
- "data": "/foo/-",
- "valid": true
- },
- {
- "description": "valid JSON-pointer (- used as object member name)",
- "data": "/foo/-/bar",
- "valid": true
- },
- {
- "description": "valid JSON-pointer (multiple escaped characters)",
- "data": "/~1~0~0~1~1",
- "valid": true
- },
- {
- "description": "valid JSON-pointer (escaped with fraction part) #1",
- "data": "/~1.1",
- "valid": true
- },
- {
- "description": "valid JSON-pointer (escaped with fraction part) #2",
- "data": "/~0.1",
- "valid": true
- },
- {
- "description": "not a valid JSON-pointer (URI Fragment Identifier) #1",
- "data": "#",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (URI Fragment Identifier) #2",
- "data": "#/",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (URI Fragment Identifier) #3",
- "data": "#a",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (some escaped, but not all) #1",
- "data": "/~0~",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (some escaped, but not all) #2",
- "data": "/~0/~",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (wrong escape character) #1",
- "data": "/~2",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (wrong escape character) #2",
- "data": "/~-1",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (multiple characters not escaped)",
- "data": "/~~",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (isn't empty nor starts with /) #1",
- "data": "a",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (isn't empty nor starts with /) #2",
- "data": "0",
- "valid": false
- },
- {
- "description": "not a valid JSON-pointer (isn't empty nor starts with /) #3",
- "data": "a/a",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/regex.json b/json/tests/draft2019-09/optional/format/regex.json
deleted file mode 100644
index 3449177..0000000
--- a/json/tests/draft2019-09/optional/format/regex.json
+++ /dev/null
@@ -1,48 +0,0 @@
-[
- {
- "description": "validation of regular expressions",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid regular expression",
- "data": "([abc])+\\s+$",
- "valid": true
- },
- {
- "description": "a regular expression with unclosed parens is invalid",
- "data": "^(abc]",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/relative-json-pointer.json b/json/tests/draft2019-09/optional/format/relative-json-pointer.json
deleted file mode 100644
index 9309986..0000000
--- a/json/tests/draft2019-09/optional/format/relative-json-pointer.json
+++ /dev/null
@@ -1,83 +0,0 @@
-[
- {
- "description": "validation of Relative JSON Pointers (RJP)",
- "schema": { "format": "relative-json-pointer" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid upwards RJP",
- "data": "1",
- "valid": true
- },
- {
- "description": "a valid downwards RJP",
- "data": "0/foo/bar",
- "valid": true
- },
- {
- "description": "a valid up and then down RJP, with array index",
- "data": "2/0/baz/1/zip",
- "valid": true
- },
- {
- "description": "a valid RJP taking the member or index name",
- "data": "0#",
- "valid": true
- },
- {
- "description": "an invalid RJP that is a valid JSON Pointer",
- "data": "/foo/bar",
- "valid": false
- },
- {
- "description": "negative prefix",
- "data": "-1/foo/bar",
- "valid": false
- },
- {
- "description": "## is not a valid json-pointer",
- "data": "0##",
- "valid": false
- },
- {
- "description": "zero cannot be followed by other digits, plus json-pointer",
- "data": "01/a",
- "valid": false
- },
- {
- "description": "zero cannot be followed by other digits, plus octothorpe",
- "data": "01#",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/time.json b/json/tests/draft2019-09/optional/format/time.json
deleted file mode 100644
index 5011d78..0000000
--- a/json/tests/draft2019-09/optional/format/time.json
+++ /dev/null
@@ -1,198 +0,0 @@
-[
- {
- "description": "validation of time strings",
- "schema": { "format": "time" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid time string",
- "data": "08:30:06Z",
- "valid": true
- },
- {
- "description": "a valid time string with leap second, Zulu",
- "data": "23:59:60Z",
- "valid": true
- },
- {
- "description": "invalid leap second, Zulu (wrong hour)",
- "data": "22:59:60Z",
- "valid": false
- },
- {
- "description": "invalid leap second, Zulu (wrong minute)",
- "data": "23:58:60Z",
- "valid": false
- },
- {
- "description": "valid leap second, zero time-offset",
- "data": "23:59:60+00:00",
- "valid": true
- },
- {
- "description": "invalid leap second, zero time-offset (wrong hour)",
- "data": "22:59:60+00:00",
- "valid": false
- },
- {
- "description": "invalid leap second, zero time-offset (wrong minute)",
- "data": "23:58:60+00:00",
- "valid": false
- },
- {
- "description": "valid leap second, positive time-offset",
- "data": "01:29:60+01:30",
- "valid": true
- },
- {
- "description": "valid leap second, large positive time-offset",
- "data": "23:29:60+23:30",
- "valid": true
- },
- {
- "description": "invalid leap second, positive time-offset (wrong hour)",
- "data": "23:59:60+01:00",
- "valid": false
- },
- {
- "description": "invalid leap second, positive time-offset (wrong minute)",
- "data": "23:59:60+00:30",
- "valid": false
- },
- {
- "description": "valid leap second, negative time-offset",
- "data": "15:59:60-08:00",
- "valid": true
- },
- {
- "description": "valid leap second, large negative time-offset",
- "data": "00:29:60-23:30",
- "valid": true
- },
- {
- "description": "invalid leap second, negative time-offset (wrong hour)",
- "data": "23:59:60-01:00",
- "valid": false
- },
- {
- "description": "invalid leap second, negative time-offset (wrong minute)",
- "data": "23:59:60-00:30",
- "valid": false
- },
- {
- "description": "a valid time string with second fraction",
- "data": "23:20:50.52Z",
- "valid": true
- },
- {
- "description": "a valid time string with precise second fraction",
- "data": "08:30:06.283185Z",
- "valid": true
- },
- {
- "description": "a valid time string with plus offset",
- "data": "08:30:06+00:20",
- "valid": true
- },
- {
- "description": "a valid time string with minus offset",
- "data": "08:30:06-08:00",
- "valid": true
- },
- {
- "description": "a valid time string with case-insensitive Z",
- "data": "08:30:06z",
- "valid": true
- },
- {
- "description": "an invalid time string with invalid hour",
- "data": "24:00:00Z",
- "valid": false
- },
- {
- "description": "an invalid time string with invalid minute",
- "data": "00:60:00Z",
- "valid": false
- },
- {
- "description": "an invalid time string with invalid second",
- "data": "00:00:61Z",
- "valid": false
- },
- {
- "description": "an invalid time string with invalid leap second (wrong hour)",
- "data": "22:59:60Z",
- "valid": false
- },
- {
- "description": "an invalid time string with invalid leap second (wrong minute)",
- "data": "23:58:60Z",
- "valid": false
- },
- {
- "description": "an invalid time string with invalid time numoffset hour",
- "data": "01:02:03+24:00",
- "valid": false
- },
- {
- "description": "an invalid time string with invalid time numoffset minute",
- "data": "01:02:03+00:60",
- "valid": false
- },
- {
- "description": "an invalid time string with invalid time with both Z and numoffset",
- "data": "01:02:03Z+00:30",
- "valid": false
- },
- {
- "description": "an invalid offset indicator",
- "data": "08:30:06 PST",
- "valid": false
- },
- {
- "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/unknown.json b/json/tests/draft2019-09/optional/format/unknown.json
deleted file mode 100644
index 12339ae..0000000
--- a/json/tests/draft2019-09/optional/format/unknown.json
+++ /dev/null
@@ -1,43 +0,0 @@
-[
- {
- "description": "unknown format",
- "schema": { "format": "unknown" },
- "tests": [
- {
- "description": "unknown formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "unknown formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "unknown formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "unknown formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "unknown formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "unknown formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "unknown formats ignore strings",
- "data": "string",
- "valid": true
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/uri-reference.json b/json/tests/draft2019-09/optional/format/uri-reference.json
deleted file mode 100644
index 7cdf228..0000000
--- a/json/tests/draft2019-09/optional/format/uri-reference.json
+++ /dev/null
@@ -1,73 +0,0 @@
-[
- {
- "description": "validation of URI References",
- "schema": { "format": "uri-reference" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid URI",
- "data": "http://foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "a valid protocol-relative URI Reference",
- "data": "//foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "a valid relative URI Reference",
- "data": "/abc",
- "valid": true
- },
- {
- "description": "an invalid URI Reference",
- "data": "\\\\WINDOWS\\fileshare",
- "valid": false
- },
- {
- "description": "a valid URI Reference",
- "data": "abc",
- "valid": true
- },
- {
- "description": "a valid URI fragment",
- "data": "#fragment",
- "valid": true
- },
- {
- "description": "an invalid URI fragment",
- "data": "#frag\\ment",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/uri-template.json b/json/tests/draft2019-09/optional/format/uri-template.json
deleted file mode 100644
index df355c5..0000000
--- a/json/tests/draft2019-09/optional/format/uri-template.json
+++ /dev/null
@@ -1,58 +0,0 @@
-[
- {
- "description": "format: uri-template",
- "schema": { "format": "uri-template" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid uri-template",
- "data": "http://example.com/dictionary/{term:1}/{term}",
- "valid": true
- },
- {
- "description": "an invalid uri-template",
- "data": "http://example.com/dictionary/{term:1}/{term",
- "valid": false
- },
- {
- "description": "a valid uri-template without variables",
- "data": "http://example.com/dictionary",
- "valid": true
- },
- {
- "description": "a valid relative uri-template",
- "data": "dictionary/{term:1}/{term}",
- "valid": true
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/uri.json b/json/tests/draft2019-09/optional/format/uri.json
deleted file mode 100644
index 792d71a..0000000
--- a/json/tests/draft2019-09/optional/format/uri.json
+++ /dev/null
@@ -1,108 +0,0 @@
-[
- {
- "description": "validation of URIs",
- "schema": { "format": "uri" },
- "tests": [
- {
- "description": "a valid URL with anchor tag",
- "data": "http://foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "a valid URL with anchor tag and parentheses",
- "data": "http://foo.com/blah_(wikipedia)_blah#cite-1",
- "valid": true
- },
- {
- "description": "a valid URL with URL-encoded stuff",
- "data": "http://foo.bar/?q=Test%20URL-encoded%20stuff",
- "valid": true
- },
- {
- "description": "a valid puny-coded URL ",
- "data": "http://xn--nw2a.xn--j6w193g/",
- "valid": true
- },
- {
- "description": "a valid URL with many special characters",
- "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
- "valid": true
- },
- {
- "description": "a valid URL based on IPv4",
- "data": "http://223.255.255.254",
- "valid": true
- },
- {
- "description": "a valid URL with ftp scheme",
- "data": "ftp://ftp.is.co.za/rfc/rfc1808.txt",
- "valid": true
- },
- {
- "description": "a valid URL for a simple text file",
- "data": "http://www.ietf.org/rfc/rfc2396.txt",
- "valid": true
- },
- {
- "description": "a valid URL ",
- "data": "ldap://[2001:db8::7]/c=GB?objectClass?one",
- "valid": true
- },
- {
- "description": "a valid mailto URI",
- "data": "mailto:John.Doe@example.com",
- "valid": true
- },
- {
- "description": "a valid newsgroup URI",
- "data": "news:comp.infosystems.www.servers.unix",
- "valid": true
- },
- {
- "description": "a valid tel URI",
- "data": "tel:+1-816-555-1212",
- "valid": true
- },
- {
- "description": "a valid URN",
- "data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
- "valid": true
- },
- {
- "description": "an invalid protocol-relative URI Reference",
- "data": "//foo.bar/?baz=qux#quux",
- "valid": false
- },
- {
- "description": "an invalid relative URI Reference",
- "data": "/abc",
- "valid": false
- },
- {
- "description": "an invalid URI",
- "data": "\\\\WINDOWS\\fileshare",
- "valid": false
- },
- {
- "description": "an invalid URI though valid URI reference",
- "data": "abc",
- "valid": false
- },
- {
- "description": "an invalid URI with spaces",
- "data": "http:// shouldfail.com",
- "valid": false
- },
- {
- "description": "an invalid URI with spaces and missing scheme",
- "data": ":// should fail",
- "valid": false
- },
- {
- "description": "an invalid URI with comma in scheme",
- "data": "bar,baz:foo",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft2019-09/optional/format/uuid.json b/json/tests/draft2019-09/optional/format/uuid.json
deleted file mode 100644
index e54cbc0..0000000
--- a/json/tests/draft2019-09/optional/format/uuid.json
+++ /dev/null
@@ -1,85 +0,0 @@
-[
- {
- "description": "uuid format",
- "schema": {
- "format": "uuid"
- },
- "tests": [
- {
- "description": "all upper-case",
- "data": "2EB8AA08-AA98-11EA-B4AA-73B441D16380",
- "valid": true
- },
- {
- "description": "all lower-case",
- "data": "2eb8aa08-aa98-11ea-b4aa-73b441d16380",
- "valid": true
- },
- {
- "description": "mixed case",
- "data": "2eb8aa08-AA98-11ea-B4Aa-73B441D16380",
- "valid": true
- },
- {
- "description": "all zeroes is valid",
- "data": "00000000-0000-0000-0000-000000000000",
- "valid": true
- },
- {
- "description": "wrong length",
- "data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638",
- "valid": false
- },
- {
- "description": "missing section",
- "data": "2eb8aa08-aa98-11ea-73b441d16380",
- "valid": false
- },
- {
- "description": "bad characters (not hex)",
- "data": "2eb8aa08-aa98-11ea-b4ga-73b441d16380",
- "valid": false
- },
- {
- "description": "no dashes",
- "data": "2eb8aa08aa9811eab4aa73b441d16380",
- "valid": false
- },
- {
- "description": "too few dashes",
- "data": "2eb8aa08aa98-11ea-b4aa73b441d16380",
- "valid": false
- },
- {
- "description": "too many dashes",
- "data": "2eb8-aa08-aa98-11ea-b4aa73b44-1d16380",
- "valid": false
- },
- {
- "description": "dashes in the wrong spot",
- "data": "2eb8aa08aa9811eab4aa73b441d16380----",
- "valid": false
- },
- {
- "description": "valid version 4",
- "data": "98d80576-482e-427f-8434-7f86890ab222",
- "valid": true
- },
- {
- "description": "valid version 5",
- "data": "99c17cbb-656f-564a-940f-1a4568f03487",
- "valid": true
- },
- {
- "description": "hypothetical version 6",
- "data": "99c17cbb-656f-664a-940f-1a4568f03487",
- "valid": true
- },
- {
- "description": "hypothetical version 15",
- "data": "99c17cbb-656f-f64a-940f-1a4568f03487",
- "valid": true
- }
- ]
- }
-]