(typeDefinition ResponseTypeDefinition, caseAction string, contentType string)
| 276 | } |
| 277 | |
| 278 | func buildUnmarshalCaseStrict(typeDefinition ResponseTypeDefinition, caseAction string, contentType string) (caseKey string, caseClause string) { |
| 279 | caseKey = fmt.Sprintf("%s.%s.%s", prefixLeastSpecific, contentType, typeDefinition.ResponseName) |
| 280 | caseClauseKey := getConditionOfResponseName("rsp.StatusCode", typeDefinition.ResponseName) |
| 281 | contentTypeLiteral := StringToGoString(contentType) |
| 282 | caseClause = fmt.Sprintf("case rsp.Header.Get(\"%s\") == %s && %s:\n%s\n", "Content-Type", contentTypeLiteral, caseClauseKey, caseAction) |
| 283 | return caseKey, caseClause |
| 284 | } |
| 285 | |
| 286 | // genResponseTypeName creates the name of generated response types (given the operationID). |
| 287 | // It first checks if the multi-pass name resolver has assigned a name for this |
no test coverage detected