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
When this field is not set, that is when is nil, the call to swag.IsZero() panics:
panic: value method github.com/go-openapi/strfmt.DateTime.IsZero called using nil *DateTime pointer
My code hasn't been modified in months and it was working perfectly few days ago. I think the problem could be related with the changes from this commit in strfmt: Adds IsZero functionality to DateTime and the beginning of the IsZero() function:
func IsZero(data interface{}) bool {
// check for things that have an IsZero method instead
if vv, ok := data.(zeroable); ok {
return vv.IsZero()
}
because now strfmt.DateTime is zeroable. Previously should go through this case in the switch:
case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
return v.IsNil()
The text was updated successfully, but these errors were encountered:
I have a swagger specification with an object that has an optional string property with date-time format. The code generated for this field is:
and the validation function generated:
When this field is not set, that is when is nil, the call to swag.IsZero() panics:
My code hasn't been modified in months and it was working perfectly few days ago. I think the problem could be related with the changes from this commit in strfmt: Adds IsZero functionality to DateTime and the beginning of the IsZero() function:
because now strfmt.DateTime is zeroable. Previously should go through this case in the switch:
The text was updated successfully, but these errors were encountered: