Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
- description: ignores other non-objects
data: 12
valid: true
- description: ignores null
data: null
valid: true
- description: ignores booleans
data: true
valid: true
- description: minProperties validation with a decimal
schema:
$schema: https://json-schema.org/draft/2019-09/schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
data: "\uFEFF"
valid: true
- description: line feed matches (line terminator)
data: |2+
data: |+

valid: true
- description: paragraph separator matches (line terminator)
Expand Down Expand Up @@ -165,7 +165,7 @@
data: "\uFEFF"
valid: false
- description: line feed does not match (line terminator)
data: |2+
data: |+

valid: false
- description: paragraph separator does not match (line terminator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
- description: a valid date string with 28 days in February (normal)
data: "2021-02-28"
valid: true
- description: a invalid date string with 29 days in February (normal)
data: 2021-02-29
valid: false
- description: a valid date string with 29 days in February (leap)
data: "2020-02-29"
valid: true
- description: a invalid date string with 30 days in February (leap)
data: 2020-02-30
valid: false
Expand Down Expand Up @@ -102,9 +96,6 @@
- description: a invalid date string with 32 days in December
data: 2020-12-32
valid: false
- description: a invalid date string with invalid month
data: 2020-13-01
valid: false
- description: an invalid date string
data: 06/19/1963
valid: false
Expand All @@ -120,9 +111,6 @@
- description: invalid month
data: 1998-13-01
valid: false
- description: invalid month-day combination
data: 1998-04-31
valid: false
- description: 2021 is not a leap year
data: 2021-02-29
valid: false
Expand All @@ -147,3 +135,74 @@
- description: an invalid time string in date-time format
data: "2020-11-28T23:55:45Z"
valid: false
- description: year 0000 is a leap year (0 % 400 == 0)
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — year zero leap year edge case
data: "0000-02-29"
valid: true
- description: century year 0100 is not a leap year
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — 100 % 100 == 0 but 100 % 400 != 0
data: 0100-02-29
valid: false
- description: century year 0400 is a leap year
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — 400-year cycle boundary
data: "0400-02-29"
valid: true
- description: century year 2100 is not a leap year
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — future century year
data: 2100-02-29
valid: false
- description: 'invalid: leading whitespace is not permitted'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — full-date grammar does not include whitespace
data: ' 2024-01-15'
valid: false
- description: 'invalid: trailing whitespace is not permitted'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — full-date grammar does not include whitespace
data: '2024-01-15 '
valid: false
- description: 'invalid: month 00 is not valid per date-month range 01-12'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — date-month = 2DIGIT ; 01-12
data: 2024-00-15
valid: false
- description: 'invalid: day 00 is not valid per date-mday minimum of 01'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — date-mday = 2DIGIT ; 01-28/29/30/31
data: 2024-01-00
valid: false
- description: 'invalid: empty string'
data: ""
valid: false
- description: 'invalid: embedded whitespace between year and month'
data: 2020 -01-01
valid: false
- description: 'invalid: trailing character after valid full-date'
data: 2020-01-01X
valid: false
- description: 'invalid: trailing Z after full-date'
data: 2020-01-01Z
valid: false
- description: 'invalid: full-date followed by space and time component'
data: 2020-01-01 00:00:00Z
valid: false
- description: 'valid: four-digit year 0001'
data: "0001-01-01"
valid: true
- description: 'invalid: two-digit year (N-2 digits)'
data: 20-01-01
valid: false
- description: 'invalid: three-digit year (N-1 digits)'
data: 998-01-01
valid: false
- description: 'invalid: five-digit year (N+1 digits)'
data: 12020-01-01
valid: false
- description: 'invalid: positive sign prefix on year'
data: +2020-01-01
valid: false
- description: 'invalid: negative sign prefix on year'
data: -2020-01-01
valid: false
- description: 'invalid: non-ASCII Bengali digit in year field'
data: ২020-01-01
valid: false
- description: 'invalid: alphabetic characters in year field'
data: YYYY-01-01
valid: false
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@
- description: ends with hyphen
data: hostname-
valid: 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
valid: false
- description: contains underscore
data: host_name
valid: false
Expand Down Expand Up @@ -227,3 +223,7 @@
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
valid: true
- 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
valid: false
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
- description: reference internals of known non-applicator
schema:
$schema: https://json-schema.org/draft/2019-09/schema
$id: /base
examples:
- type: string
$ref: '#/examples/0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
- description: ignores other non-objects
data: 12
valid: true
- description: ignores null
data: null
valid: true
- description: ignores booleans
data: true
valid: true
- description: propertyNames validation with pattern
schema:
$schema: https://json-schema.org/draft/2019-09/schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1137,3 +1137,44 @@
bar: foo
bar: bar
valid: false
- description: Evaluated properties collection needs to consider instance location with patternProperties
schema:
$schema: https://json-schema.org/draft/2019-09/schema
properties:
foo:
patternProperties:
^bar$:
type: string
unevaluatedProperties: false
tests:
- description: with only the nested evaluated property
data:
foo:
bar: foo
valid: true
- description: with an unevaluated property that exists at another location
data:
foo:
bar: foo
bar: bar
valid: false
- description: Evaluated properties collection needs to consider instance location with additionalProperties
schema:
$schema: https://json-schema.org/draft/2019-09/schema
properties:
foo:
additionalProperties:
type: string
unevaluatedProperties: false
tests:
- description: with only the nested evaluated property
data:
foo:
bar: foo
valid: true
- description: with an unevaluated property that exists at another location
data:
foo:
bar: foo
bar: bar
valid: false
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
- description: ignores other non-objects
data: 12
valid: true
- description: ignores null
data: null
valid: true
- description: ignores booleans
data: true
valid: true
- description: minProperties validation with a decimal
schema:
$schema: https://json-schema.org/draft/2020-12/schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
data: "\uFEFF"
valid: true
- description: line feed matches (line terminator)
data: |2+
data: |+

valid: true
- description: paragraph separator matches (line terminator)
Expand Down Expand Up @@ -165,7 +165,7 @@
data: "\uFEFF"
valid: false
- description: line feed does not match (line terminator)
data: |2+
data: |+

valid: false
- description: paragraph separator does not match (line terminator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
- description: a valid date string with 28 days in February (normal)
data: "2021-02-28"
valid: true
- description: a invalid date string with 29 days in February (normal)
data: 2021-02-29
valid: false
- description: a valid date string with 29 days in February (leap)
data: "2020-02-29"
valid: true
- description: a invalid date string with 30 days in February (leap)
data: 2020-02-30
valid: false
Expand Down Expand Up @@ -102,9 +96,6 @@
- description: a invalid date string with 32 days in December
data: 2020-12-32
valid: false
- description: a invalid date string with invalid month
data: 2020-13-01
valid: false
- description: an invalid date string
data: 06/19/1963
valid: false
Expand All @@ -120,9 +111,6 @@
- description: invalid month
data: 1998-13-01
valid: false
- description: invalid month-day combination
data: 1998-04-31
valid: false
- description: 2021 is not a leap year
data: 2021-02-29
valid: false
Expand All @@ -147,3 +135,74 @@
- description: an invalid time string in date-time format
data: "2020-11-28T23:55:45Z"
valid: false
- description: year 0000 is a leap year (0 % 400 == 0)
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — year zero leap year edge case
data: "0000-02-29"
valid: true
- description: century year 0100 is not a leap year
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — 100 % 100 == 0 but 100 % 400 != 0
data: 0100-02-29
valid: false
- description: century year 0400 is a leap year
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — 400-year cycle boundary
data: "0400-02-29"
valid: true
- description: century year 2100 is not a leap year
comment: https://www.rfc-editor.org/rfc/rfc3339#appendix-C — future century year
data: 2100-02-29
valid: false
- description: 'invalid: leading whitespace is not permitted'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — full-date grammar does not include whitespace
data: ' 2024-01-15'
valid: false
- description: 'invalid: trailing whitespace is not permitted'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — full-date grammar does not include whitespace
data: '2024-01-15 '
valid: false
- description: 'invalid: month 00 is not valid per date-month range 01-12'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — date-month = 2DIGIT ; 01-12
data: 2024-00-15
valid: false
- description: 'invalid: day 00 is not valid per date-mday minimum of 01'
comment: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — date-mday = 2DIGIT ; 01-28/29/30/31
data: 2024-01-00
valid: false
- description: 'invalid: empty string'
data: ""
valid: false
- description: 'invalid: embedded whitespace between year and month'
data: 2020 -01-01
valid: false
- description: 'invalid: trailing character after valid full-date'
data: 2020-01-01X
valid: false
- description: 'invalid: trailing Z after full-date'
data: 2020-01-01Z
valid: false
- description: 'invalid: full-date followed by space and time component'
data: 2020-01-01 00:00:00Z
valid: false
- description: 'valid: four-digit year 0001'
data: "0001-01-01"
valid: true
- description: 'invalid: two-digit year (N-2 digits)'
data: 20-01-01
valid: false
- description: 'invalid: three-digit year (N-1 digits)'
data: 998-01-01
valid: false
- description: 'invalid: five-digit year (N+1 digits)'
data: 12020-01-01
valid: false
- description: 'invalid: positive sign prefix on year'
data: +2020-01-01
valid: false
- description: 'invalid: negative sign prefix on year'
data: -2020-01-01
valid: false
- description: 'invalid: non-ASCII Bengali digit in year field'
data: ২020-01-01
valid: false
- description: 'invalid: alphabetic characters in year field'
data: YYYY-01-01
valid: false
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@
- description: ends with hyphen
data: hostname-
valid: 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
valid: false
- description: contains underscore
data: host_name
valid: false
Expand Down Expand Up @@ -227,3 +223,7 @@
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
valid: true
- 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
valid: false
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
- description: reference internals of known non-applicator
schema:
$schema: https://json-schema.org/draft/2020-12/schema
$id: /base
examples:
- type: string
$ref: '#/examples/0'
Expand Down
Loading
Loading