File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const (
38
38
FormatOfStringDate = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])$`
39
39
40
40
// FormatOfStringDateTime is a RFC3339 date-time format regexp, for example "2017-07-21T17:32:28Z".
41
- FormatOfStringDateTime = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)[0-9]{2}:[0-9]{2})? $`
41
+ FormatOfStringDateTime = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)[0-9]{2}:[0-9]{2})$`
42
42
)
43
43
const (
44
44
SerializationSimple = "simple"
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const (
44
44
FormatOfStringDate = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])$`
45
45
46
46
// FormatOfStringDateTime is a RFC3339 date-time format regexp, for example "2017-07-21T17:32:28Z".
47
- FormatOfStringDateTime = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)[0-9]{2}:[0-9]{2})? $`
47
+ FormatOfStringDateTime = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)[0-9]{2}:[0-9]{2})$`
48
48
)
49
49
50
50
func init () {
Original file line number Diff line number Diff line change @@ -489,7 +489,6 @@ var schemaExamples = []schemaExample{
489
489
"format" : "date-time" ,
490
490
},
491
491
AllValid : []any {
492
- "2017-12-31T11:59:59" ,
493
492
"2017-12-31T11:59:59Z" ,
494
493
"2017-12-31T11:59:59-11:30" ,
495
494
"2017-12-31T11:59:59+11:30" ,
@@ -503,6 +502,7 @@ var schemaExamples = []schemaExample{
503
502
"2017-12-31T11:59:59\n " ,
504
503
"2017-12-31T11:59:59.+11:30" ,
505
504
"2017-12-31T11:59:59.Z" ,
505
+ "2017-12-31T11:59:59" ,
506
506
},
507
507
},
508
508
Original file line number Diff line number Diff line change @@ -248,14 +248,14 @@ func TestFilter(t *testing.T) {
248
248
// Test query parameter openapi3filter
249
249
req = ExampleRequest {
250
250
Method : "POST" ,
251
- URL : "http://example.com/api/prefix/v/suffix?queryArgAnyOf=ae&queryArgOneOf=ac&queryArgAllOf=2017-12-31T11:59:59 " ,
251
+ URL : "http://example.com/api/prefix/v/suffix?queryArgAnyOf=ae&queryArgOneOf=ac&queryArgAllOf=2017-12-31T11:59:59Z " ,
252
252
}
253
253
err = expect (req , resp )
254
254
require .NoError (t , err )
255
255
256
256
req = ExampleRequest {
257
257
Method : "POST" ,
258
- URL : "http://example.com/api/prefix/v/suffix?queryArgAnyOf=2017-12-31T11:59:59 " ,
258
+ URL : "http://example.com/api/prefix/v/suffix?queryArgAnyOf=2017-12-31T11:59:59Z " ,
259
259
}
260
260
err = expect (req , resp )
261
261
require .NoError (t , err )
@@ -269,7 +269,7 @@ func TestFilter(t *testing.T) {
269
269
270
270
req = ExampleRequest {
271
271
Method : "POST" ,
272
- URL : "http://example.com/api/prefix/v/suffix?queryArgOneOf=2017-12-31T11:59:59 " ,
272
+ URL : "http://example.com/api/prefix/v/suffix?queryArgOneOf=2017-12-31T11:59:59Z " ,
273
273
}
274
274
err = expect (req , resp )
275
275
require .IsType (t , & RequestError {}, err )
You can’t perform that action at this time.
0 commit comments