forked from loafle/openapi-generator-original
Accept header forces application/json type even if server (#10337)
* fix!: accept should not force application JSON
Generated code offen provides range of accept methods.
This method improperly takes JSON as preferred
Example:
localVarHTTPHeaderAccepts := []string{"application/zip", "application/json"}
* chore: generated changes
This commit is contained in:
@@ -94,10 +94,6 @@ func selectHeaderAccept(accepts []string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
if contains(accepts, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
|
||||
return strings.Join(accepts, ",")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user