forked from loafle/openapi-generator-original
[javascript] fix use of isBasicBasic and isBasicBearer conditions (#15522)
This commit is contained in:
@@ -204,11 +204,17 @@ Class | Method | HTTP request | Description
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
|
||||
- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
||||
{{/isBasicBearer}}
|
||||
{{#isHttpSignature}}
|
||||
|
||||
- **Type**: HTTP signature authentication
|
||||
{{/isHttpSignature}}
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}
|
||||
|
||||
|
||||
@@ -117,12 +117,12 @@ export const {{classname}}FetchParamCreator = function (configuration?: Configur
|
||||
}
|
||||
{{/isKeyInQuery}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
// http basic authentication required
|
||||
if (configuration && (configuration.username || configuration.password)) {
|
||||
localVarHeaderParameter["Authorization"] = "Basic " + btoa(configuration.username + ":" + configuration.password);
|
||||
}
|
||||
{{/isBasic}}
|
||||
{{/isBasicBasic}}
|
||||
{{#isOAuth}}
|
||||
// oauth required
|
||||
if (configuration && configuration.accessToken) {
|
||||
|
||||
@@ -209,6 +209,9 @@ Class | Method | HTTP request | Description
|
||||
{{#isBasicBearer}}
|
||||
- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
||||
{{/isBasicBearer}}
|
||||
{{#isHttpSignature}}
|
||||
- **Type**: HTTP signature authentication
|
||||
{{/isHttpSignature}}
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}
|
||||
|
||||
|
||||
@@ -258,4 +258,5 @@ Authentication schemes defined for the API:
|
||||
|
||||
### http_signature_test
|
||||
|
||||
- **Type**: HTTP signature authentication
|
||||
|
||||
|
||||
@@ -258,4 +258,5 @@ Authentication schemes defined for the API:
|
||||
|
||||
### http_signature_test
|
||||
|
||||
- **Type**: HTTP signature authentication
|
||||
|
||||
|
||||
@@ -256,4 +256,5 @@ Authentication schemes defined for the API:
|
||||
|
||||
### http_signature_test
|
||||
|
||||
- **Type**: HTTP signature authentication
|
||||
|
||||
|
||||
Reference in New Issue
Block a user