Fix issue in Configuration-body.mustache in objc client

This commit is contained in:
geekerzp 2015-08-07 18:31:07 +08:00
parent 29e8a8f573
commit 732a9eb64d
2 changed files with 35 additions and 22 deletions

View File

@ -104,14 +104,27 @@
- (NSDictionary *) authSettings {
return @{
@"api_key": @{
@"type": @"api_key",
@"in": @"header",
@"key": @"api_key",
@"value": [self getApiKeyWithPrefix:@"api_key"]
},
};
{{#authMethods}}
{{#isApiKey}}
@"{{name}}":
@{
@"type": @"api_key",
@"in": {{#isKeyInHeader}}@"header"{{/isKeyInHeader}}{{#isKeyInQuery}}@"query"{{/isKeyInQuery}},
@"key": @"{{keyParamName}}",
@"value": [self getApiKeyWithPrefix:@"{{keyParamName}}"]
},
{{/isApiKey}}
{{#isBasic}}
@"{{name}}":
@{
@"type": @"basic",
@"in": @"header",
@"key": @"Authorization",
@"value": [self getBasicAuthToken]
},
{{/isBasic}}
{{/authMethods}}
};
}
@end

View File

@ -104,14 +104,14 @@
- (NSDictionary *) authSettings {
return @{
@"api_key": @{
@"type": @"api_key",
@"in": @"header",
@"key": @"api_key",
@"value": [self getApiKeyWithPrefix:@"api_key"]
},
};
@"api_key":
@{
@"type": @"api_key",
@"in": @"header",
@"key": @"api_key",
@"value": [self getApiKeyWithPrefix:@"api_key"]
},
};
}
@end