Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use positive isBasicBasic tag instead of negative isBasicBearer
  • Loading branch information
sebastien-rosset committed Jan 23, 2020
commit 7797fe4146e4ff94500b35bb74d797756b733fef
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
{{/emitJSDoc}}{{=< >=}} this.authentications = {
<#authMethods>
<#isBasic>
<^isBasicBearer>
<#isBasicBasic>
'<name>': {type: 'basic'}<^-last>,</-last>
</isBasicBearer>
</isBasicBasic>
<#isBasicBearer>
'<name>': {type: 'bearer'}<^-last>,</-last><#bearerFormat> // <&.></bearerFormat>
</isBasicBearer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ var {{{moduleName}}} = require('{{{projectName}}}');
var defaultClient = {{{moduleName}}}.ApiClient.instance;
{{#authMethods}}
{{#isBasic}}
{{^isBasicBearer}}
{{#isBasicBasic}}
// Configure HTTP basic authorization: {{{name}}}
var {{{name}}} = defaultClient.authentications['{{{name}}}'];
{{{name}}}.username = 'YOUR USERNAME'
{{{name}}}.password = 'YOUR PASSWORD'
{{/isBasicBearer}}
{{/isBasicBasic}}
{{#isBasicBearer}}
// Configure Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} access token for authorization: {{{name}}}
var {{{name}}} = defaultClient.authentications['{{{name}}}'];
Expand Down Expand Up @@ -192,10 +192,10 @@ All endpoints do not require authorization.
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasic}}
{{^isBasicBearer}}
{{#isBasicBasic}}

- **Type**: HTTP basic authentication
{{/isBasicBearer}}
{{/isBasicBasic}}
{{#isBasicBearer}}

- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ var {{{moduleName}}} = require('{{{projectName}}}');
var defaultClient = {{{moduleName}}}.ApiClient.instance;
{{#authMethods}}
{{#isBasic}}
{{^isBasicBearer}}
{{#isBasicBasic}}
// Configure HTTP basic authorization: {{{name}}}
var {{{name}}} = defaultClient.authentications['{{{name}}}'];
{{{name}}}.username = 'YOUR USERNAME';
{{{name}}}.password = 'YOUR PASSWORD';
{{/isBasicBearer}}
{{/isBasicBasic}}
{{#isBasicBearer}}
// Configure Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} access token for authorization: {{{name}}}
var {{{name}}} = defaultClient.authentications['{{{name}}}'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class ApiClient {
this.authentications = {
<#authMethods>
<#isBasic>
<^isBasicBearer>
<#isBasicBasic>
'<name>': {type: 'basic'}<^-last>,</-last>
</isBasicBearer>
</isBasicBasic>
<#isBasicBearer>
'<name>': {type: 'bearer'}<^-last>,</-last><#bearerFormat> // <&.></bearerFormat>
</isBasicBearer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ var {{{moduleName}}} = require('{{{projectName}}}');
var defaultClient = {{{moduleName}}}.ApiClient.instance;
{{#authMethods}}
{{#isBasic}}
{{^isBasicBearer}}
{{#isBasicBasic}}
// Configure HTTP basic authorization: {{{name}}}
var {{{name}}} = defaultClient.authentications['{{{name}}}'];
{{{name}}}.username = 'YOUR USERNAME'
{{{name}}}.password = 'YOUR PASSWORD'
{{/isBasicBearer}}
{{/isBasicBasic}}
{{#isBasicBearer}}
// Configure Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} access token for authorization: {{{name}}}
var {{{name}}} = defaultClient.authentications['{{{name}}}'];
Expand Down Expand Up @@ -206,9 +206,9 @@ All endpoints do not require authorization.
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}}
{{#isBasic}}
{{^isBasicBearer}}
{{#isBasicBasic}}
- **Type**: HTTP basic authentication
{{/isBasicBearer}}
{{/isBasicBasic}}
{{#isBasicBearer}}
- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
{{/isBasicBearer}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import {{{moduleName}}} from '{{{projectName}}}';
let defaultClient = {{{moduleName}}}.ApiClient.instance;
{{#authMethods}}
{{#isBasic}}
{{^isBasicBearer}}
{{#isBasicBasic}}
// Configure HTTP basic authorization: {{{name}}}
let {{{name}}} = defaultClient.authentications['{{{name}}}'];
{{{name}}}.username = 'YOUR USERNAME';
{{{name}}}.password = 'YOUR PASSWORD';
{{/isBasicBearer}}
{{/isBasicBasic}}
{{#isBasicBearer}}
// Configure Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} access token for authorization: {{{name}}}
let {{{name}}} = defaultClient.authentications['{{{name}}}'];
Expand Down