mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
[Golang][client] fix RFC-3339 date-time query param (#325)
This commit is contained in:
parent
dbb44a153d
commit
a20f93b42f
@ -142,6 +142,8 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
|||||||
|
|
||||||
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
||||||
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
|
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)
|
return fmt.Sprintf("%v", obj)
|
||||||
|
@ -1 +1 @@
|
|||||||
3.0.0-SNAPSHOT
|
3.1.0-SNAPSHOT
|
File diff suppressed because it is too large
Load Diff
@ -153,6 +153,8 @@ func parameterToString(obj interface{}, collectionFormat string) string {
|
|||||||
|
|
||||||
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
||||||
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
|
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)
|
return fmt.Sprintf("%v", obj)
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
# ModelApiResponse
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**Code** | **int32** | | [optional] [default to null]
|
|
||||||
**Type_** | **string** | | [optional] [default to null]
|
|
||||||
**Message** | **string** | | [optional] [default to null]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
# ModelReturn
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**Return_** | **int32** | | [optional] [default to null]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
# OuterBoolean
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
# OuterNumber
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
# OuterString
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
* Swagger Petstore
|
|
||||||
*
|
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
||||||
*
|
|
||||||
* API version: 1.0.0
|
|
||||||
* Contact: apiteam@swagger.io
|
|
||||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
|
||||||
*/
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
type OuterBoolean struct {
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
* Swagger Petstore
|
|
||||||
*
|
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
||||||
*
|
|
||||||
* API version: 1.0.0
|
|
||||||
* Contact: apiteam@swagger.io
|
|
||||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
|
||||||
*/
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
type OuterNumber struct {
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
* Swagger Petstore
|
|
||||||
*
|
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
||||||
*
|
|
||||||
* API version: 1.0.0
|
|
||||||
* Contact: apiteam@swagger.io
|
|
||||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
|
||||||
*/
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
type OuterString struct {
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user