cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft6/optional/format/date-time.json (about) 1 [ 2 { 3 "description": "validation of date-time strings", 4 "schema": { 5 "format": "date-time" 6 }, 7 "tests": [ 8 { 9 "description": "all string formats ignore integers", 10 "data": 12, 11 "valid": true 12 }, 13 { 14 "description": "all string formats ignore floats", 15 "data": 13.7, 16 "valid": true 17 }, 18 { 19 "description": "all string formats ignore objects", 20 "data": {}, 21 "valid": true 22 }, 23 { 24 "description": "all string formats ignore arrays", 25 "data": [], 26 "valid": true 27 }, 28 { 29 "description": "all string formats ignore booleans", 30 "data": false, 31 "valid": true 32 }, 33 { 34 "description": "all string formats ignore nulls", 35 "data": null, 36 "valid": true 37 }, 38 { 39 "description": "a valid date-time string", 40 "data": "1963-06-19T08:30:06.283185Z", 41 "valid": true 42 }, 43 { 44 "description": "a valid date-time string without second fraction", 45 "data": "1963-06-19T08:30:06Z", 46 "valid": true 47 }, 48 { 49 "description": "a valid date-time string with plus offset", 50 "data": "1937-01-01T12:00:27.87+00:20", 51 "valid": true 52 }, 53 { 54 "description": "a valid date-time string with minus offset", 55 "data": "1990-12-31T15:59:50.123-08:00", 56 "valid": true 57 }, 58 { 59 "description": "a valid date-time with a leap second, UTC", 60 "data": "1998-12-31T23:59:60Z", 61 "valid": true, 62 "skip": { 63 "v2": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3: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", 64 "v3": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T23:59:60Z\" and [...] (mismatched types string and list):\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and bool (mismatched types string and bool):\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and number (mismatched types string and number):\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1998-12-31T23:59:60Z\" and {...} (mismatched types string and struct):\n generated.cue:3: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" 65 } 66 }, 67 { 68 "description": "a valid date-time with a leap second, with minus offset", 69 "data": "1998-12-31T15:59:60.123-08:00", 70 "valid": true, 71 "skip": { 72 "v2": "6 errors in empty disjunction:\nconflicting values \"1998-12-31T15:59:60.123-08:00\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3: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:3:1\n generated.cue:3: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:3: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:3:1\n generated.cue:3: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:3:1\n generated.cue:3: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", 73 "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:3: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:3: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:3: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:3: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:3: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" 74 } 75 }, 76 { 77 "description": "an invalid date-time past leap second, UTC", 78 "data": "1998-12-31T23:59:61Z", 79 "valid": false 80 }, 81 { 82 "description": "an invalid date-time with leap second on a wrong minute, UTC", 83 "data": "1998-12-31T23:58:60Z", 84 "valid": false 85 }, 86 { 87 "description": "an invalid date-time with leap second on a wrong hour, UTC", 88 "data": "1998-12-31T22:59:60Z", 89 "valid": false 90 }, 91 { 92 "description": "an invalid day in date-time string", 93 "data": "1990-02-31T15:59:59.123-08:00", 94 "valid": false 95 }, 96 { 97 "description": "an invalid offset in date-time string", 98 "data": "1990-12-31T15:59:59-24:00", 99 "valid": false, 100 "skip": { 101 "v2": "unexpected success", 102 "v3": "unexpected success" 103 } 104 }, 105 { 106 "description": "an invalid closing Z after time-zone offset", 107 "data": "1963-06-19T08:30:06.28123+01:00Z", 108 "valid": false 109 }, 110 { 111 "description": "an invalid date-time string", 112 "data": "06/19/1963 08:30:06 PST", 113 "valid": false 114 }, 115 { 116 "description": "case-insensitive T and Z", 117 "data": "1963-06-19t08:30:06.283185z", 118 "valid": true, 119 "skip": { 120 "v2": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:1\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3:1\n generated.cue:3: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", 121 "v3": "6 errors in empty disjunction:\nconflicting values \"1963-06-19t08:30:06.283185z\" and [...] (mismatched types string and list):\n generated.cue:3:36\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and bool (mismatched types string and bool):\n generated.cue:3:8\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and null (mismatched types string and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and number (mismatched types string and number):\n generated.cue:3:15\n instance.json:1:1\nconflicting values \"1963-06-19t08:30:06.283185z\" and {...} (mismatched types string and struct):\n generated.cue:3: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" 122 } 123 }, 124 { 125 "description": "only RFC3339 not all of ISO 8601 are valid", 126 "data": "2013-350T01:01:01", 127 "valid": false 128 }, 129 { 130 "description": "invalid non-padded month dates", 131 "data": "1963-6-19T08:30:06.283185Z", 132 "valid": false 133 }, 134 { 135 "description": "invalid non-padded day dates", 136 "data": "1963-06-1T08:30:06.283185Z", 137 "valid": false 138 }, 139 { 140 "description": "invalid non-ASCII '৪' (a Bengali 4) in date portion", 141 "data": "1963-06-1৪T00:00:00Z", 142 "valid": false 143 }, 144 { 145 "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", 146 "data": "1963-06-11T0৪:00:00Z", 147 "valid": false 148 } 149 ] 150 } 151 ]