You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this library in tandem with oapi codegen. I am validating a request with ?start_time\=2024-10-22T00:00:00-04:00 as a query param. The validation works fine but I was experimenting and removed the timezone offset and sent ?start_time\=2024-10-22T00:00:00 and that seems to make it past the validation from kin openapi and doesn't make it past the codegen generated validation for date-time.
In their library they do
// Time is a special case of a struct that we handle
parsedTime, err := time.Parse(time.RFC3339Nano, src)
if err != nil {
parsedTime, err = time.Parse(types.DateFormat, src)
if err != nil {
return fmt.Errorf("error parsing '%s' as RFC3339 or 2006-01-02 time: %s", src, err)
}
}
time.Parse, so if I'm understanding this right, I think the regex needs to be strengthened to match that validation
The text was updated successfully, but these errors were encountered:
I'm using this library in tandem with oapi codegen. I am validating a request with
?start_time\=2024-10-22T00:00:00-04:00
as a query param. The validation works fine but I was experimenting and removed the timezone offset and sent?start_time\=2024-10-22T00:00:00
and that seems to make it past the validation from kin openapi and doesn't make it past the codegen generated validation for date-time.In their library they do
time.Parse, so if I'm understanding this right, I think the regex needs to be strengthened to match that validation
The text was updated successfully, but these errors were encountered: