(ctx context.Context, endpoint string)
| 175 | } |
| 176 | |
| 177 | func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { |
| 178 | osv := ctx.Value(ContextOperationServerVariables) |
| 179 | if osv != nil { |
| 180 | if operationVariables, ok := osv.(map[string]map[string]string); !ok { |
| 181 | return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) |
| 182 | } else { |
| 183 | variables, ok := operationVariables[endpoint] |
| 184 | if ok { |
| 185 | return variables, nil |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | return getServerVariables(ctx) |
| 190 | } |
| 191 | |
| 192 | // ServerURLWithContext returns a new server URL given an endpoint |
| 193 | func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { |
no test coverage detected