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:
parent
61852a072a
commit
18301d0011
@ -101,10 +101,6 @@ func selectHeaderAccept(accepts []string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if contains(accepts, "application/json") {
|
|
||||||
return "application/json"
|
|
||||||
}
|
|
||||||
|
|
||||||
return strings.Join(accepts, ",")
|
return strings.Join(accepts, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,10 +109,6 @@ func selectHeaderAccept(accepts []string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if contains(accepts, "application/json") {
|
|
||||||
return "application/json"
|
|
||||||
}
|
|
||||||
|
|
||||||
return strings.Join(accepts, ",")
|
return strings.Join(accepts, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,10 +94,6 @@ func selectHeaderAccept(accepts []string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if contains(accepts, "application/json") {
|
|
||||||
return "application/json"
|
|
||||||
}
|
|
||||||
|
|
||||||
return strings.Join(accepts, ",")
|
return strings.Join(accepts, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,10 +112,6 @@ func selectHeaderAccept(accepts []string) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if contains(accepts, "application/json") {
|
|
||||||
return "application/json"
|
|
||||||
}
|
|
||||||
|
|
||||||
return strings.Join(accepts, ",")
|
return strings.Join(accepts, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user