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 (
3838 FormatOfStringDate = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])$`
3939
4040 // 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})$`
4242)
4343const (
4444 SerializationSimple = "simple"
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const (
4444 FormatOfStringDate = `^[0-9]{4}-(0[1-9]|10|11|12)-(0[1-9]|[12][0-9]|3[01])$`
4545
4646 // 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})$`
4848)
4949
5050func init () {
Original file line number Diff line number Diff line change @@ -489,7 +489,6 @@ var schemaExamples = []schemaExample{
489489 "format" : "date-time" ,
490490 },
491491 AllValid : []any {
492- "2017-12-31T11:59:59" ,
493492 "2017-12-31T11:59:59Z" ,
494493 "2017-12-31T11:59:59-11:30" ,
495494 "2017-12-31T11:59:59+11:30" ,
@@ -503,6 +502,7 @@ var schemaExamples = []schemaExample{
503502 "2017-12-31T11:59:59\n " ,
504503 "2017-12-31T11:59:59.+11:30" ,
505504 "2017-12-31T11:59:59.Z" ,
505+ "2017-12-31T11:59:59" ,
506506 },
507507 },
508508
Original file line number Diff line number Diff line change @@ -248,14 +248,14 @@ func TestFilter(t *testing.T) {
248248 // Test query parameter openapi3filter
249249 req = ExampleRequest {
250250 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 " ,
252252 }
253253 err = expect (req , resp )
254254 require .NoError (t , err )
255255
256256 req = ExampleRequest {
257257 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 " ,
259259 }
260260 err = expect (req , resp )
261261 require .NoError (t , err )
@@ -269,7 +269,7 @@ func TestFilter(t *testing.T) {
269269
270270 req = ExampleRequest {
271271 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 " ,
273273 }
274274 err = expect (req , resp )
275275 require .IsType (t , & RequestError {}, err )
You can’t perform that action at this time.
0 commit comments