forked from loafle/openapi-generator-original
[GO] dont canonize headers (#10779)
* [GO]: dont canonize headers * [GO]: update unit tests
This commit is contained in:
parent
552a31d85c
commit
d91ff3a150
@ -316,7 +316,7 @@ func (c *APIClient) prepareRequest(
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers.Set(h, v)
|
||||
headers[h] = []string{v}
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
reqb, _ := httputil.DumpRequest(r.Request, true)
|
||||
if !strings.Contains((string)(reqb), "Api_key: TEST123") {
|
||||
if !strings.Contains((string)(reqb), "api_key: TEST123") {
|
||||
t.Errorf("APIKey Authentication is missing")
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
reqb, _ := httputil.DumpRequest(r.Request, true)
|
||||
if !strings.Contains((string)(reqb), "Api_key: Bearer TEST123") {
|
||||
if !strings.Contains((string)(reqb), "api_key: Bearer TEST123") {
|
||||
t.Errorf("APIKey Authentication is missing")
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ func (c *APIClient) prepareRequest(
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers.Set(h, v)
|
||||
headers[h] = []string{v}
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ func (c *APIClient) prepareRequest(
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers.Set(h, v)
|
||||
headers[h] = []string{v}
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
reqb, _ := httputil.DumpRequest(r.Request, true)
|
||||
if !strings.Contains((string)(reqb), "Api_key: TEST123") {
|
||||
if !strings.Contains((string)(reqb), "api_key: TEST123") {
|
||||
t.Errorf("APIKey Authentication is missing")
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
reqb, _ := httputil.DumpRequest(r.Request, true)
|
||||
if !strings.Contains((string)(reqb), "Api_key: Bearer TEST123") {
|
||||
if !strings.Contains((string)(reqb), "api_key: Bearer TEST123") {
|
||||
t.Errorf("APIKey Authentication is missing")
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ func (c *APIClient) prepareRequest(
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers.Set(h, v)
|
||||
headers[h] = []string{v}
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user