forked from loafle/openapi-generator-original
[go] Fix panic from marshalling Nil NullableTime (#17772)
This commit is contained in:
committed by
GitHub
parent
ba4e5ef495
commit
5334014098
@@ -321,7 +321,7 @@ func NewNullableTime(val *time.Time) *NullableTime {
|
||||
}
|
||||
|
||||
func (v NullableTime) MarshalJSON() ([]byte, error) {
|
||||
return v.value.MarshalJSON()
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableTime) UnmarshalJSON(src []byte) error {
|
||||
|
||||
Reference in New Issue
Block a user