cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft2019-09/optional/format/date-time.json (about)

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