[ { "description": "validation of date-time strings", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "format": "date-time" }, "skip": { "v3-roundtrip": "generation only supported in version https://json-schema.org/draft/2020-12/schema" }, "tests": [ { "description": "all string formats ignore integers", "data": 12, "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "all string formats ignore floats", "data": 13.7, "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "all string formats ignore objects", "data": {}, "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "all string formats ignore arrays", "data": [], "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "all string formats ignore booleans", "data": false, "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "all string formats ignore nulls", "data": null, "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "a valid date-time string", "data": "1963-06-19T08:30:06.283185Z", "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "a valid date-time string without second fraction", "data": "1963-06-19T08:30:06Z", "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "a valid date-time string with plus offset", "data": "1937-01-01T12:00:27.87+00:20", "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "a valid date-time string with minus offset", "data": "1990-12-31T15:59:50.123-08:00", "valid": true, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "a valid date-time with a leap second, UTC", "data": "1998-12-31T23:59:60Z", "valid": true, "skip": { "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T23:59:60Z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T23:59:60Z\":\n generated.cue:1:1\n instance.json:1:1\n", "v3-roundtrip": "could not extract schema" } }, { "description": "a valid date-time with a leap second, with minus offset", "data": "1998-12-31T15:59:60.123-08:00", "valid": true, "skip": { "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1998-12-31T15:59:60.123-08:00\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1998-12-31T15:59:60.123-08:00\":\n generated.cue:1:1\n instance.json:1:1\n", "v3-roundtrip": "could not extract schema" } }, { "description": "an invalid date-time past leap second, UTC", "data": "1998-12-31T23:59:61Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "an invalid date-time with leap second on a wrong minute, UTC", "data": "1998-12-31T23:58:60Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "an invalid date-time with leap second on a wrong hour, UTC", "data": "1998-12-31T22:59:60Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "an invalid day in date-time string", "data": "1990-02-31T15:59:59.123-08:00", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "an invalid offset in date-time string", "data": "1990-12-31T15:59:59-24:00", "valid": false, "skip": { "v3": "unexpected success", "v3-roundtrip": "could not extract schema" } }, { "description": "an invalid closing Z after time-zone offset", "data": "1963-06-19T08:30:06.28123+01:00Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "an invalid date-time string", "data": "06/19/1963 08:30:06 PST", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "case-insensitive T and Z", "data": "1963-06-19t08:30:06.283185z", "valid": true, "skip": { "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:5:1\n generated.cue:5:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:5:1\n generated.cue:5:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:5:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:5:1\n generated.cue:5:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:5:1\n generated.cue:5:44\n instance.json:1:1\ninvalid value \"1963-06-19t08:30:06.283185z\" (does not satisfy time.Time): error in call to time.Time: invalid time \"1963-06-19t08:30:06.283185z\":\n generated.cue:1:1\n instance.json:1:1\n", "v3-roundtrip": "could not extract schema" } }, { "description": "only RFC3339 not all of ISO 8601 are valid", "data": "2013-350T01:01:01", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "invalid non-padded month dates", "data": "1963-6-19T08:30:06.283185Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "invalid non-padded day dates", "data": "1963-06-1T08:30:06.283185Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", "data": "1963-06-1৪T00:00:00Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } }, { "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false, "skip": { "v3-roundtrip": "could not extract schema" } } ] } ]