parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
(obj any, collectionFormat string)
| 124 | } |
| 125 | return nil |
| 126 | } |
| 127 | |
| 128 | func parameterValueToString(obj interface{}, key string) string { |
| 129 | if reflect.TypeOf(obj).Kind() != reflect.Ptr { |
| 130 | if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { |
| 131 | return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) |
| 132 | } |
| 133 | |
| 134 | return fmt.Sprintf("%v", obj) |
| 135 | } |
| 136 | var param, ok = obj.(MappedNullable) |
| 137 | if !ok { |
| 138 | return "" |
| 139 | } |
| 140 | dataMap, err := param.ToMap() |
| 141 | if err != nil { |
| 142 | return "" |
| 143 | } |
| 144 | return fmt.Sprintf("%v", dataMap[key]) |
| 145 | } |
| 146 | |
| 147 | // parameterAddToHeaderOrQuery adds the provided object to the request header or url query |
| 148 | // supporting deep object syntax |
no outgoing calls
no test coverage detected