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 { - (NSDictionary *) authSettings {
return @{ return @{
@"api_key": @{ {{#authMethods}}
@"type": @"api_key", {{#isApiKey}}
@"in": @"header", @"{{name}}":
@"key": @"api_key", @{
@"value": [self getApiKeyWithPrefix:@"api_key"] @"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 @end

View File

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