forked from loafle/openapi-generator-original
ParameterToString can panic
Let the fmt package help convert the obj to a string. Previously this could panic if the obj was an int.
This commit is contained in:
parent
bd7904d42a
commit
cb547c113a
@ -94,7 +94,7 @@ func (c *APIClient) ParameterToString(obj interface{},collectionFormat string) s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj.(string)
|
return fmt.Sprintf("%v", obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
func prepareRequest(postBody interface{},
|
func prepareRequest(postBody interface{},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user