forked from loafle/openapi-generator-original
add RFC-3339 formatting to parameterToString (#502)
This commit is contained in:
parent
a0936bec02
commit
93832340a5
@ -142,6 +142,8 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
||||
|
||||
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
||||
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
|
||||
} else if t, ok := obj.(time.Time); ok {
|
||||
return t.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v", obj)
|
||||
|
@ -1 +1 @@
|
||||
3.1.0-SNAPSHOT
|
||||
3.1.1-SNAPSHOT
|
@ -153,6 +153,8 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
||||
|
||||
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
||||
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
|
||||
} else if t, ok := obj.(time.Time); ok {
|
||||
return t.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v", obj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user