5456 lines
144 KiB
JSON
5456 lines
144 KiB
JSON
[
|
||
{
|
||
"description": "validation of date-time strings",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "date-time",
|
||
"$id": "format_0_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date-time string",
|
||
"data": "1963-06-19T08:30:06.283185Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date-time string without second fraction",
|
||
"data": "1963-06-19T08:30:06Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date-time string with plus offset",
|
||
"data": "1937-01-01T12:00:27.87+00:20",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date-time string with minus offset",
|
||
"data": "1990-12-31T15:59:50.123-08:00",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date-time with a leap second, UTC",
|
||
"data": "1998-12-31T23:59:60Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date-time with a leap second, with minus offset",
|
||
"data": "1998-12-31T15:59:60.123-08:00",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid date-time past leap second, UTC",
|
||
"data": "1998-12-31T23:59:61Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid date-time with leap second on a wrong minute, UTC",
|
||
"data": "1998-12-31T23:58:60Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid date-time with leap second on a wrong hour, UTC",
|
||
"data": "1998-12-31T22:59:60Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid day in date-time string",
|
||
"data": "1990-02-31T15:59:59.123-08:00",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid offset in date-time string",
|
||
"data": "1990-12-31T15:59:59-24:00",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid closing Z after time-zone offset",
|
||
"data": "1963-06-19T08:30:06.28123+01:00Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid date-time string",
|
||
"data": "06/19/1963 08:30:06 PST",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "case-insensitive T and Z",
|
||
"data": "1963-06-19t08:30:06.283185z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "only RFC3339 not all of ISO 8601 are valid",
|
||
"data": "2013-350T01:01:01",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-padded month dates",
|
||
"data": "1963-6-19T08:30:06.283185Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-padded day dates",
|
||
"data": "1963-06-1T08:30:06.283185Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '৪' (a Bengali 4) in date portion",
|
||
"data": "1963-06-1৪T00:00:00Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '৪' (a Bengali 4) in time portion",
|
||
"data": "1963-06-11T0৪:00:00Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid extended year",
|
||
"data": "+11963-06-19T08:30:06.283185Z",
|
||
"schema_id": "format_0_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of date strings",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "date",
|
||
"$id": "format_1_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string",
|
||
"data": "1963-06-19",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 31 days in January",
|
||
"data": "2020-01-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 32 days in January",
|
||
"data": "2020-01-32",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 28 days in February (normal)",
|
||
"data": "2021-02-28",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 29 days in February (normal)",
|
||
"data": "2021-02-29",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 29 days in February (leap)",
|
||
"data": "2020-02-29",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 30 days in February (leap)",
|
||
"data": "2020-02-30",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 31 days in March",
|
||
"data": "2020-03-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 32 days in March",
|
||
"data": "2020-03-32",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 30 days in April",
|
||
"data": "2020-04-30",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 31 days in April",
|
||
"data": "2020-04-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 31 days in May",
|
||
"data": "2020-05-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 32 days in May",
|
||
"data": "2020-05-32",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 30 days in June",
|
||
"data": "2020-06-30",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 31 days in June",
|
||
"data": "2020-06-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 31 days in July",
|
||
"data": "2020-07-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 32 days in July",
|
||
"data": "2020-07-32",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 31 days in August",
|
||
"data": "2020-08-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 32 days in August",
|
||
"data": "2020-08-32",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 30 days in September",
|
||
"data": "2020-09-30",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 31 days in September",
|
||
"data": "2020-09-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 31 days in October",
|
||
"data": "2020-10-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 32 days in October",
|
||
"data": "2020-10-32",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 30 days in November",
|
||
"data": "2020-11-30",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 31 days in November",
|
||
"data": "2020-11-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid date string with 31 days in December",
|
||
"data": "2020-12-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with 32 days in December",
|
||
"data": "2020-12-32",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a invalid date string with invalid month",
|
||
"data": "2020-13-01",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid date string",
|
||
"data": "06/19/1963",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "only RFC3339 not all of ISO 8601 are valid",
|
||
"data": "2013-350",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "non-padded month dates are not valid",
|
||
"data": "1998-1-20",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "non-padded day dates are not valid",
|
||
"data": "1998-01-1",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid month",
|
||
"data": "1998-13-01",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid month-day combination",
|
||
"data": "1998-04-31",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "2021 is not a leap year",
|
||
"data": "2021-02-29",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "2020 is a leap year",
|
||
"data": "2020-02-29",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '৪' (a Bengali 4)",
|
||
"data": "1963-06-1৪",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ISO8601 / non-RFC3339: YYYYMMDD without dashes (2023-03-28)",
|
||
"data": "20230328",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ISO8601 / non-RFC3339: week number implicit day of week (2023-01-02)",
|
||
"data": "2023-W01",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ISO8601 / non-RFC3339: week number with day of week (2023-03-28)",
|
||
"data": "2023-W13-2",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ISO8601 / non-RFC3339: week number rollover to next year (2023-01-01)",
|
||
"data": "2022W527",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string in date-time format",
|
||
"data": "2020-11-28T23:55:45Z",
|
||
"schema_id": "format_1_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of duration strings",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "duration",
|
||
"$id": "format_2_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid duration string",
|
||
"data": "P4DT12H30M5S",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid duration string",
|
||
"data": "PT1D",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "must start with P",
|
||
"data": "4DT12H30M5S",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no elements present",
|
||
"data": "P",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no time elements present",
|
||
"data": "P1YT",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no date or time elements present",
|
||
"data": "PT",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "elements out of order",
|
||
"data": "P2D1Y",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "missing time separator",
|
||
"data": "P1D2H",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "time element in the date position",
|
||
"data": "P2S",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "four years duration",
|
||
"data": "P4Y",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "zero time, in seconds",
|
||
"data": "PT0S",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "zero time, in days",
|
||
"data": "P0D",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "one month duration",
|
||
"data": "P1M",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "one minute duration",
|
||
"data": "PT1M",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "one and a half days, in hours",
|
||
"data": "PT36H",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "one and a half days, in days and hours",
|
||
"data": "P1DT12H",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "two weeks",
|
||
"data": "P2W",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "weeks cannot be combined with other units",
|
||
"data": "P1Y2W",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '২' (a Bengali 2)",
|
||
"data": "P২Y",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "element without unit",
|
||
"data": "P1",
|
||
"schema_id": "format_2_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "\\a is not an ECMA 262 control escape",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "regex",
|
||
"$id": "format_3_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "when used as a pattern",
|
||
"data": "\\a",
|
||
"schema_id": "format_3_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of e-mail addresses",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "email",
|
||
"$id": "format_4_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid e-mail address",
|
||
"data": "joe.bloggs@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid e-mail address",
|
||
"data": "2962",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "tilde in local part is valid",
|
||
"data": "te~st@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "tilde before local part is valid",
|
||
"data": "~test@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "tilde after local part is valid",
|
||
"data": "test~@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a quoted string with a space in the local part is valid",
|
||
"data": "\"joe bloggs\"@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a quoted string with a double dot in the local part is valid",
|
||
"data": "\"joe..bloggs\"@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a quoted string with a @ in the local part is valid",
|
||
"data": "\"joe@bloggs\"@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an IPv4-address-literal after the @ is valid",
|
||
"data": "joe.bloggs@[127.0.0.1]",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an IPv6-address-literal after the @ is valid",
|
||
"data": "joe.bloggs@[IPv6:::1]",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "dot before local part is not valid",
|
||
"data": ".test@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "dot after local part is not valid",
|
||
"data": "test.@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "two separated dots inside local part are valid",
|
||
"data": "te.s.t@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "two subsequent dots inside local part are not valid",
|
||
"data": "te..st@example.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid domain",
|
||
"data": "joe.bloggs@invalid=domain.com",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid IPv4-address-literal",
|
||
"data": "joe.bloggs@[127.0.0.300]",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "two email addresses is not valid",
|
||
"data": "user1@oceania.org, user2@oceania.org",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "full \"From\" header is invalid",
|
||
"data": "\"Winston Smith\" <winston.smith@recdep.minitrue> (Records Department)",
|
||
"schema_id": "format_4_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of host names",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "hostname",
|
||
"$id": "format_5_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid host name",
|
||
"data": "www.example.com",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label",
|
||
"data": "hostname",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label with digits",
|
||
"data": "h0stn4me",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label starting with digit",
|
||
"data": "1host",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label ending with digit",
|
||
"data": "hostnam3",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "empty string",
|
||
"data": "",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single dot",
|
||
"data": ".",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "leading dot",
|
||
"data": ".example",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing dot",
|
||
"data": "example.",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "IDN label separator",
|
||
"data": "example.com",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "single label with hyphen",
|
||
"data": "host-name",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "starts with hyphen",
|
||
"data": "-hostname",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ends with hyphen",
|
||
"data": "hostname-",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "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",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "contains underscore",
|
||
"data": "host_name",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "exceeds maximum overall length (256)",
|
||
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "maximum label length (63)",
|
||
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "exceeds maximum label length (63)",
|
||
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
|
||
"schema_id": "format_5_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of A-label (punycode) host names",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "hostname",
|
||
"$id": "format_6_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"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",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid host name (example.test in Hangul)",
|
||
"data": "xn--9n2bp8q.xn--9t4b11yi5a",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "contains illegal char U+302E Hangul single dot tone mark",
|
||
"data": "xn--07jt112bpxg.xn--9t4b11yi5a",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "Begins with a Spacing Combining Mark",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
|
||
"data": "xn--hello-txk",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "Begins with a Nonspacing Mark",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
|
||
"data": "xn--hello-zed",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "Begins with an Enclosing Mark",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
|
||
"data": "xn--hello-6bf",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--zca29lwxobi7a",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--qmbc",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--chb89f",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--07jceefgh4c",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--al-0ea",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--l-fda",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--la-0ea",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--l-gda",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--ll-0ea",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--S-jib3p",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--wva3j",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--wva3je",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--A-2hc5h",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--5db1e",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--4dbc5h",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--A-2hc8h",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--5db3e",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--4dbc8h",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--defabc-k64e",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--vek",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--k8j5u",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--bck0j",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--vek778f",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--ngb6iyr",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--ngba1o",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--0-gyc",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--11b2er09f",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--02b508i",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--11b2ezcw70k",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--11b2ezcs70k",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "xn--ngba5hb2804a",
|
||
"schema_id": "format_6_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of an internationalized e-mail addresses",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "idn-email",
|
||
"$id": "format_7_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid idn e-mail (example@example.test in Hangul)",
|
||
"data": "실례@실례.테스트",
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid idn e-mail address",
|
||
"data": "2962",
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid e-mail address",
|
||
"data": "joe.bloggs@example.com",
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid e-mail address",
|
||
"data": "2962",
|
||
"schema_id": "format_7_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of internationalized host names",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "idn-hostname",
|
||
"$id": "format_8_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid host name (example.test in Hangul)",
|
||
"data": "실례.테스트",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "illegal first char U+302E Hangul single dot tone mark",
|
||
"data": "〮실례.테스트",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "contains illegal char U+302E Hangul single dot tone mark",
|
||
"data": "실〮례.테스트",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a host name with a component too long",
|
||
"data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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 <--",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "U-label starts with a dash",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
|
||
"data": "-hello",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "U-label ends with a dash",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
|
||
"data": "hello-",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "U-label starts and ends with a dash",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1",
|
||
"data": "-hello-",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "Begins with a Spacing Combining Mark",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
|
||
"data": "ःhello",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "Begins with a Nonspacing Mark",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
|
||
"data": "̀hello",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "Begins with an Enclosing Mark",
|
||
"comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2",
|
||
"data": "҈hello",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "ßς་〇",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "۽۾",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "ـߺ",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "〱〲〳〴〵〮〯〻",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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·l",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "·l",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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·a",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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·",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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·l",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "α͵S",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "α͵",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "α͵β",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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׳ב",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "׳ב",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "א׳ב",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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״ב",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "״ב",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "א״ב",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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・abc",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "・",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "・ぁ",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "・ァ",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "・丈",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "ب٠۰",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "ب٠ب",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "۰0",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "कष",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "ष",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "क्ष",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "क्ष",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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": "بيبي",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label",
|
||
"data": "hostname",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label with hyphen",
|
||
"data": "host-name",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label with digits",
|
||
"data": "h0stn4me",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label starting with digit",
|
||
"data": "1host",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "single label ending with digit",
|
||
"data": "hostnam3",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "empty string",
|
||
"data": "",
|
||
"schema_id": "format_8_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of separators in internationalized host names",
|
||
"specification": [
|
||
{
|
||
"rfc3490": "3.1",
|
||
"quote": "Whenever dots are used as label separators, the following characters MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61(halfwidth ideographic full stop)"
|
||
}
|
||
],
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "idn-hostname",
|
||
"$id": "format_9_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "single dot",
|
||
"data": ".",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "single ideographic full stop",
|
||
"data": "。",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "single fullwidth full stop",
|
||
"data": ".",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "single halfwidth ideographic full stop",
|
||
"data": "。",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "dot as label separator",
|
||
"data": "a.b",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "ideographic full stop as label separator",
|
||
"data": "a。b",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "fullwidth full stop as label separator",
|
||
"data": "a.b",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "halfwidth ideographic full stop as label separator",
|
||
"data": "a。b",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "leading dot",
|
||
"data": ".example",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "leading ideographic full stop",
|
||
"data": "。example",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "leading fullwidth full stop",
|
||
"data": ".example",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "leading halfwidth ideographic full stop",
|
||
"data": "。example",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing dot",
|
||
"data": "example.",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing ideographic full stop",
|
||
"data": "example。",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing fullwidth full stop",
|
||
"data": "example.",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing halfwidth ideographic full stop",
|
||
"data": "example。",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "label too long if separator ignored (full stop)",
|
||
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα.com",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "label too long if separator ignored (ideographic full stop)",
|
||
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα。com",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "label too long if separator ignored (fullwidth full stop)",
|
||
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα.com",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "label too long if separator ignored (halfwidth ideographic full stop)",
|
||
"data": "παράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπαράδειγμαπα。com",
|
||
"schema_id": "format_9_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of IP addresses",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "ipv4",
|
||
"$id": "format_10_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IP address",
|
||
"data": "192.168.0.1",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an IP address with too many components",
|
||
"data": "127.0.0.0.1",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an IP address with out-of-range values",
|
||
"data": "256.256.256.256",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an IP address without 4 components",
|
||
"data": "127.0",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an IP address as an integer",
|
||
"data": "0x7f000001",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an IP address as an integer (decimal)",
|
||
"data": "2130706433",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leading zeroes, 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",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "value without leading zero is valid",
|
||
"data": "87.10.0.1",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '২' (a Bengali 2)",
|
||
"data": "1২7.0.0.1",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "netmask is not a part of ipv4 address",
|
||
"data": "192.168.1.0/24",
|
||
"schema_id": "format_10_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of IPv6 addresses",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "ipv6",
|
||
"$id": "format_11_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IPv6 address",
|
||
"data": "::1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an IPv6 address with out-of-range values",
|
||
"data": "12345::",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing 4 hex symbols is valid",
|
||
"data": "::abef",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing 5 hex symbols is invalid",
|
||
"data": "::abcef",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": 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",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an IPv6 address containing illegal characters",
|
||
"data": "::laptop",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no digits is valid",
|
||
"data": "::",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "leading colons is valid",
|
||
"data": "::42:ff:1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing colons is valid",
|
||
"data": "d6::",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "missing leading octet is invalid",
|
||
"data": ":2:3:4:5:6:7:8",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "missing trailing octet is invalid",
|
||
"data": "1:2:3:4:5:6:7:",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "missing leading octet with omitted octets later",
|
||
"data": ":2:3:4::8",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "single set of double colons in the middle is valid",
|
||
"data": "1:d6::42",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "two sets of double colons is invalid",
|
||
"data": "1::d6::42",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "mixed format with the ipv4 section as decimal octets",
|
||
"data": "1::d6:192.168.0.1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "mixed format with double colons between the sections",
|
||
"data": "1:2::192.168.0.1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "mixed format with ipv4 section with octet out of range",
|
||
"data": "1::2:192.168.256.1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "mixed format with ipv4 section with a hex octet",
|
||
"data": "1::2:192.168.ff.1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "mixed format with leading double colons (ipv4-mapped ipv6 address)",
|
||
"data": "::ffff:192.168.0.1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "triple colons is invalid",
|
||
"data": "1:2:3:4:5:::8",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "8 octets",
|
||
"data": "1:2:3:4:5:6:7:8",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "insufficient octets without double colons",
|
||
"data": "1:2:3:4:5:6:7",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no colons is invalid",
|
||
"data": "1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ipv4 is not ipv6",
|
||
"data": "127.0.0.1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ipv4 segment must have 4 octets",
|
||
"data": "1:2:3:4:1.2.3",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "leading whitespace is invalid",
|
||
"data": " ::1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "trailing whitespace is invalid",
|
||
"data": "::1 ",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "netmask is not a part of ipv6 address",
|
||
"data": "fe80::/64",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "zone id is not a part of ipv6 address",
|
||
"data": "fe80::a%eth1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a long valid ipv6",
|
||
"data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a long invalid ipv6, below length limit, first",
|
||
"data": "100:100:100:100:100:100:255.255.255.255.255",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a long invalid ipv6, below length limit, second",
|
||
"data": "100:100:100:100:100:100:100:255.255.255.255",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '৪' (a Bengali 4)",
|
||
"data": "1:2:3:4:5:6:7:৪",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '৪' (a Bengali 4) in the IPv4 portion",
|
||
"data": "1:2::192.16৪.0.1",
|
||
"schema_id": "format_11_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of IRI References",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "iri-reference",
|
||
"$id": "format_12_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI",
|
||
"data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid protocol-relative IRI Reference",
|
||
"data": "//ƒøø.ßår/?∂éœ=πîx#πîüx",
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid relative IRI Reference",
|
||
"data": "/âππ",
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid IRI Reference",
|
||
"data": "\\\\WINDOWS\\filëßåré",
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI Reference",
|
||
"data": "âππ",
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI fragment",
|
||
"data": "#ƒrägmênt",
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid IRI fragment",
|
||
"data": "#ƒräg\\mênt",
|
||
"schema_id": "format_12_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of IRIs",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "iri",
|
||
"$id": "format_13_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI with anchor tag",
|
||
"data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI with anchor tag and parentheses",
|
||
"data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI with URL-encoded stuff",
|
||
"data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI with many special characters",
|
||
"data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid IRI based on IPv6",
|
||
"data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid IRI based on IPv6",
|
||
"data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid relative IRI Reference",
|
||
"data": "/abc",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid IRI",
|
||
"data": "\\\\WINDOWS\\filëßåré",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid IRI though valid IRI reference",
|
||
"data": "âππ",
|
||
"schema_id": "format_13_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of JSON-pointers (JSON String Representation)",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "json-pointer",
|
||
"$id": "format_14_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid JSON-pointer",
|
||
"data": "/foo/bar~0/baz~1/%a",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (~ not escaped)",
|
||
"data": "/foo/bar~",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer with empty segment",
|
||
"data": "/foo//bar",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer with the last empty segment",
|
||
"data": "/foo/bar/",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #1",
|
||
"data": "",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #2",
|
||
"data": "/foo",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #3",
|
||
"data": "/foo/0",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #4",
|
||
"data": "/",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #5",
|
||
"data": "/a~1b",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #6",
|
||
"data": "/c%d",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #7",
|
||
"data": "/e^f",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #8",
|
||
"data": "/g|h",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #9",
|
||
"data": "/i\\j",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #10",
|
||
"data": "/k\"l",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #11",
|
||
"data": "/ ",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer as stated in RFC 6901 #12",
|
||
"data": "/m~0n",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer used adding to the last array position",
|
||
"data": "/foo/-",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer (- used as object member name)",
|
||
"data": "/foo/-/bar",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer (multiple escaped characters)",
|
||
"data": "/~1~0~0~1~1",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer (escaped with fraction part) #1",
|
||
"data": "/~1.1",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid JSON-pointer (escaped with fraction part) #2",
|
||
"data": "/~0.1",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (URI Fragment Identifier) #1",
|
||
"data": "#",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (URI Fragment Identifier) #2",
|
||
"data": "#/",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (URI Fragment Identifier) #3",
|
||
"data": "#a",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (some escaped, but not all) #1",
|
||
"data": "/~0~",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (some escaped, but not all) #2",
|
||
"data": "/~0/~",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (wrong escape character) #1",
|
||
"data": "/~2",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (wrong escape character) #2",
|
||
"data": "/~-1",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (multiple characters not escaped)",
|
||
"data": "/~~",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (isn't empty nor starts with /) #1",
|
||
"data": "a",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (isn't empty nor starts with /) #2",
|
||
"data": "0",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "not a valid JSON-pointer (isn't empty nor starts with /) #3",
|
||
"data": "a/a",
|
||
"schema_id": "format_14_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of regular expressions",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "regex",
|
||
"$id": "format_15_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid regular expression",
|
||
"data": "([abc])+\\s+$",
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a regular expression with unclosed parens is invalid",
|
||
"data": "^(abc]",
|
||
"schema_id": "format_15_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of Relative JSON Pointers (RJP)",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "relative-json-pointer",
|
||
"$id": "format_16_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid upwards RJP",
|
||
"data": "1",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid downwards RJP",
|
||
"data": "0/foo/bar",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid up and then down RJP, with array index",
|
||
"data": "2/0/baz/1/zip",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid RJP taking the member or index name",
|
||
"data": "0#",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid RJP that is a valid JSON Pointer",
|
||
"data": "/foo/bar",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "negative prefix",
|
||
"data": "-1/foo/bar",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "explicit positive prefix",
|
||
"data": "+1/foo/bar",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "## is not a valid json-pointer",
|
||
"data": "0##",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "zero cannot be followed by other digits, plus json-pointer",
|
||
"data": "01/a",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "zero cannot be followed by other digits, plus octothorpe",
|
||
"data": "01#",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "empty string",
|
||
"data": "",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "multi-digit integer prefix",
|
||
"data": "120/foo/bar",
|
||
"schema_id": "format_16_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of time strings",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "time",
|
||
"$id": "format_17_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid time string",
|
||
"data": "08:30:06Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid time string with extra leading zeros",
|
||
"data": "008:030:006Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid time string with no leading zero for single digit",
|
||
"data": "8:3:6Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "hour, minute, second must be two digits",
|
||
"data": "8:0030:6Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid time string with leap second, Zulu",
|
||
"data": "23:59:60Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, Zulu (wrong hour)",
|
||
"data": "22:59:60Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, Zulu (wrong minute)",
|
||
"data": "23:58:60Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "valid leap second, zero time-offset",
|
||
"data": "23:59:60+00:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, zero time-offset (wrong hour)",
|
||
"data": "22:59:60+00:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, zero time-offset (wrong minute)",
|
||
"data": "23:58:60+00:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "valid leap second, positive time-offset",
|
||
"data": "01:29:60+01:30",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid leap second, large positive time-offset",
|
||
"data": "23:29:60+23:30",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, positive time-offset (wrong hour)",
|
||
"data": "23:59:60+01:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, positive time-offset (wrong minute)",
|
||
"data": "23:59:60+00:30",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "valid leap second, negative time-offset",
|
||
"data": "15:59:60-08:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid leap second, large negative time-offset",
|
||
"data": "00:29:60-23:30",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, negative time-offset (wrong hour)",
|
||
"data": "23:59:60-01:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid leap second, negative time-offset (wrong minute)",
|
||
"data": "23:59:60-00:30",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid time string with second fraction",
|
||
"data": "23:20:50.52Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid time string with precise second fraction",
|
||
"data": "08:30:06.283185Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid time string with plus offset",
|
||
"data": "08:30:06+00:20",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid time string with minus offset",
|
||
"data": "08:30:06-08:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "hour, minute in time-offset must be two digits",
|
||
"data": "08:30:06-8:000",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid time string with case-insensitive Z",
|
||
"data": "08:30:06z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid hour",
|
||
"data": "24:00:00Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid minute",
|
||
"data": "00:60:00Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid second",
|
||
"data": "00:00:61Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid leap second (wrong hour)",
|
||
"data": "22:59:60Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid leap second (wrong minute)",
|
||
"data": "23:58:60Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid time numoffset hour",
|
||
"data": "01:02:03+24:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid time numoffset minute",
|
||
"data": "01:02:03+00:60",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string with invalid time with both Z and numoffset",
|
||
"data": "01:02:03Z+00:30",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid offset indicator",
|
||
"data": "08:30:06 PST",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "only RFC3339 not all of ISO 8601 are valid",
|
||
"data": "01:01:01,1111",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no time offset",
|
||
"data": "12:00:00",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no time offset with second fraction",
|
||
"data": "12:00:00.52",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid non-ASCII '২' (a Bengali 2)",
|
||
"data": "1২:00:00Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "offset not starting with plus or minus",
|
||
"data": "08:30:06#00:20",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "contains letters",
|
||
"data": "ab:cd:ef",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid time string in date-time format",
|
||
"data": "2020-11-28T23:55:45Z",
|
||
"schema_id": "format_17_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "unknown format",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "unknown",
|
||
"$id": "format_18_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "unknown formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_18_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "unknown formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_18_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "unknown formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_18_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "unknown formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_18_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "unknown formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_18_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "unknown formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_18_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "unknown formats ignore strings",
|
||
"data": "string",
|
||
"schema_id": "format_18_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of URI References",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "uri-reference",
|
||
"$id": "format_19_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URI",
|
||
"data": "http://foo.bar/?baz=qux#quux",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid protocol-relative URI Reference",
|
||
"data": "//foo.bar/?baz=qux#quux",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid relative URI Reference",
|
||
"data": "/abc",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid URI Reference",
|
||
"data": "\\\\WINDOWS\\fileshare",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URI Reference",
|
||
"data": "abc",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URI fragment",
|
||
"data": "#fragment",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid URI fragment",
|
||
"data": "#frag\\ment",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "unescaped non US-ASCII characters",
|
||
"data": "/foobar®.txt",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid backslash character",
|
||
"data": "https://example.org/foobar\\.txt",
|
||
"schema_id": "format_19_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "format: uri-template",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "uri-template",
|
||
"$id": "format_20_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid uri-template",
|
||
"data": "http://example.com/dictionary/{term:1}/{term}",
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid uri-template",
|
||
"data": "http://example.com/dictionary/{term:1}/{term",
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid uri-template without variables",
|
||
"data": "http://example.com/dictionary",
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid relative uri-template",
|
||
"data": "dictionary/{term:1}/{term}",
|
||
"schema_id": "format_20_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "validation of URIs",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "uri",
|
||
"$id": "format_21_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL with anchor tag",
|
||
"data": "http://foo.bar/?baz=qux#quux",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL with anchor tag and parentheses",
|
||
"data": "http://foo.com/blah_(wikipedia)_blah#cite-1",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL with URL-encoded stuff",
|
||
"data": "http://foo.bar/?q=Test%20URL-encoded%20stuff",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid puny-coded URL ",
|
||
"data": "http://xn--nw2a.xn--j6w193g/",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL with many special characters",
|
||
"data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL based on IPv4",
|
||
"data": "http://223.255.255.254",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL with ftp scheme",
|
||
"data": "ftp://ftp.is.co.za/rfc/rfc1808.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL for a simple text file",
|
||
"data": "http://www.ietf.org/rfc/rfc2396.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URL ",
|
||
"data": "ldap://[2001:db8::7]/c=GB?objectClass?one",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid mailto URI",
|
||
"data": "mailto:John.Doe@example.com",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid newsgroup URI",
|
||
"data": "news:comp.infosystems.www.servers.unix",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid tel URI",
|
||
"data": "tel:+1-816-555-1212",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "a valid URN",
|
||
"data": "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid protocol-relative URI Reference",
|
||
"data": "//foo.bar/?baz=qux#quux",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid relative URI Reference",
|
||
"data": "/abc",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid URI",
|
||
"data": "\\\\WINDOWS\\fileshare",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid URI though valid URI reference",
|
||
"data": "abc",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid URI with spaces",
|
||
"data": "http:// shouldfail.com",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid URI with spaces and missing scheme",
|
||
"data": ":// should fail",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "an invalid URI with comma in scheme",
|
||
"data": "bar,baz:foo",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid userinfo",
|
||
"data": "https://[@example.org/test.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "unescaped non US-ASCII characters",
|
||
"data": "https://example.org/foobar®.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid backslash character",
|
||
"data": "https://example.org/foobar\\.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid \" character",
|
||
"data": "https://example.org/foobar\".txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid <> characters",
|
||
"data": "https://example.org/foobar<>.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid {} characters",
|
||
"data": "https://example.org/foobar{}.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid ^ character",
|
||
"data": "https://example.org/foobar^.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid ` character",
|
||
"data": "https://example.org/foobar`.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid SPACE character",
|
||
"data": "https://example.org/foo bar.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid | character",
|
||
"data": "https://example.org/foobar|.txt",
|
||
"schema_id": "format_21_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "uuid format",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "uuid",
|
||
"$id": "format_22_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "all string formats ignore integers",
|
||
"data": 12,
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore floats",
|
||
"data": 13.7,
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore objects",
|
||
"data": {},
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore arrays",
|
||
"data": [],
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore booleans",
|
||
"data": false,
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all string formats ignore nulls",
|
||
"data": null,
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all upper-case",
|
||
"data": "2EB8AA08-AA98-11EA-B4AA-73B441D16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all lower-case",
|
||
"data": "2eb8aa08-aa98-11ea-b4aa-73b441d16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "mixed case",
|
||
"data": "2eb8aa08-AA98-11ea-B4Aa-73B441D16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "all zeroes is valid",
|
||
"data": "00000000-0000-0000-0000-000000000000",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "wrong length",
|
||
"data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "missing section",
|
||
"data": "2eb8aa08-aa98-11ea-73b441d16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "bad characters (not hex)",
|
||
"data": "2eb8aa08-aa98-11ea-b4ga-73b441d16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "no dashes",
|
||
"data": "2eb8aa08aa9811eab4aa73b441d16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "too few dashes",
|
||
"data": "2eb8aa08aa98-11ea-b4aa73b441d16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "too many dashes",
|
||
"data": "2eb8-aa08-aa98-11ea-b4aa73b44-1d16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "dashes in the wrong spot",
|
||
"data": "2eb8aa08aa9811eab4aa73b441d16380----",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "shifted dashes",
|
||
"data": "2eb8aa0-8aa98-11e-ab4aa7-3b441d16380",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "valid version 4",
|
||
"data": "98d80576-482e-427f-8434-7f86890ab222",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid version 5",
|
||
"data": "99c17cbb-656f-564a-940f-1a4568f03487",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "hypothetical version 6",
|
||
"data": "99c17cbb-656f-664a-940f-1a4568f03487",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "hypothetical version 15",
|
||
"data": "99c17cbb-656f-f64a-940f-1a4568f03487",
|
||
"schema_id": "format_22_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "period format",
|
||
"database": {
|
||
"schemas": [
|
||
{
|
||
"format": "period",
|
||
"$id": "format_23_0"
|
||
}
|
||
]
|
||
},
|
||
"tests": [
|
||
{
|
||
"description": "valid period (start/duration)",
|
||
"data": "2020-01-01T00:00:00Z/P1Y",
|
||
"schema_id": "format_23_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid period (duration/end)",
|
||
"data": "P1Y/2021-01-01T00:00:00Z",
|
||
"schema_id": "format_23_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "valid period (start/end)",
|
||
"data": "2020-01-01T00:00:00Z/2021-01-01T00:00:00Z",
|
||
"schema_id": "format_23_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
},
|
||
{
|
||
"description": "invalid period (missing slash)",
|
||
"data": "2020-01-01T00:00:00ZP1Y",
|
||
"schema_id": "format_23_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": false
|
||
}
|
||
},
|
||
{
|
||
"description": "ignores non-strings",
|
||
"data": 123,
|
||
"schema_id": "format_23_0",
|
||
"action": "validate",
|
||
"expect": {
|
||
"success": true
|
||
}
|
||
}
|
||
]
|
||
}
|
||
] |