fix JS auth issue due to missig comma

This commit is contained in:
wing328 2016-08-31 17:50:56 +08:00
parent eb59e2945e
commit d464bfbd59
2 changed files with 14 additions and 6 deletions

View File

@ -40,10 +40,18 @@
* The authentication methods to be included for all API calls. * The authentication methods to be included for all API calls.
* @type {Array.<String>} * @type {Array.<String>}
*/ */
{{/emitJSDoc}}{{=< >=}} this.authentications = {<#authMethods><#isBasic> {{/emitJSDoc}}{{=< >=}} this.authentications = {
'<name>': {type: 'basic'}</isBasic><#isApiKey> <#authMethods>
'<name>': {type: 'apiKey', 'in': <#isKeyInHeader>'header'</isKeyInHeader><^isKeyInHeader>'query'</isKeyInHeader>, name: '<keyParamName>'}</isApiKey><#isOAuth> <#isBasic>
'<name>': {type: 'oauth2'}</isOAuth><#hasMore>,</hasMore></authMethods> '<name>': {type: 'basic'}<^-last>,</-last>
</isBasic>
<#isApiKey>
'<name>': {type: 'apiKey', 'in': <#isKeyInHeader>'header'</isKeyInHeader><^isKeyInHeader>'query'</isKeyInHeader>, name: '<keyParamName>'}<^-last>,</-last>
</isApiKey>
<#isOAuth>
'<name>': {type: 'oauth2'}<^-last>,</-last>
</isOAuth>
</authMethods>
}; };
<={{ }}=> <={{ }}=>
{{#emitJSDoc}} /** {{#emitJSDoc}} /**

View File

@ -65,8 +65,8 @@
*/ */
this.authentications = { this.authentications = {
'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'}, 'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'},
'http_basic_test': {type: 'basic'} 'http_basic_test': {type: 'basic'},
'petstore_auth': {type: 'oauth2'}, 'petstore_auth': {type: 'oauth2'}
}; };
/** /**
* The default HTTP headers to be included for all API calls. * The default HTTP headers to be included for all API calls.