forked from loafle/openapi-generator-original
Merge pull request #3282 from wing328/objc_fix_typo
[ObjC] fix typo in readme doc
This commit is contained in:
commit
7de7c6de43
@ -84,10 +84,10 @@ Please follow the [installation procedure](#installation--usage) and then run th
|
||||
|
||||
{{classname}} *apiInstance = [[{{classname}} alloc] init];
|
||||
|
||||
{{#summary}} // {{{.}}}
|
||||
{{#summary}}// {{{.}}}
|
||||
{{/summary}}[apiInstance {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.firstParamAltName}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{#secondaryParam}}
|
||||
{{paramName}}{{/secondaryParam}}:{{paramName}}{{/allParams}}
|
||||
{{#hasParams}}completionHandler: {{/hasParams}}^({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error)) {
|
||||
{{#hasParams}}completionHandler: {{/hasParams}}^({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error) {
|
||||
{{#returnType}}
|
||||
if (output) {
|
||||
NSLog(@"%@", output);
|
||||
|
@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version:
|
||||
- Build date: 2016-06-16T11:33:30.448+02:00
|
||||
- Build date: 2016-07-03T21:49:00.509+08:00
|
||||
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen
|
||||
|
||||
## Requirements
|
||||
@ -74,9 +74,9 @@ SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to t
|
||||
|
||||
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
|
||||
|
||||
// Add a new pet to the store
|
||||
// Add a new pet to the store
|
||||
[apiInstance addPetWithBody:body
|
||||
completionHandler: ^(NSError* error)) {
|
||||
completionHandler: ^(NSError* error) {
|
||||
if (error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}
|
||||
@ -124,6 +124,12 @@ Class | Method | HTTP request | Description
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
## petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
@ -133,12 +139,6 @@ Class | Method | HTTP request | Description
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
@ -376,7 +376,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
||||
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
|
||||
|
||||
// Authentication setting
|
||||
NSArray *authSettings = @[@"petstore_auth", @"api_key"];
|
||||
NSArray *authSettings = @[@"api_key", @"petstore_auth"];
|
||||
|
||||
id bodyParam = nil;
|
||||
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
|
||||
|
@ -110,13 +110,6 @@
|
||||
|
||||
- (NSDictionary *) authSettings {
|
||||
return @{
|
||||
@"petstore_auth":
|
||||
@{
|
||||
@"type": @"oauth",
|
||||
@"in": @"header",
|
||||
@"key": @"Authorization",
|
||||
@"value": [self getAccessToken]
|
||||
},
|
||||
@"api_key":
|
||||
@{
|
||||
@"type": @"api_key",
|
||||
@ -124,6 +117,13 @@
|
||||
@"key": @"api_key",
|
||||
@"value": [self getApiKeyWithPrefix:@"api_key"]
|
||||
},
|
||||
@"petstore_auth":
|
||||
@{
|
||||
@"type": @"oauth",
|
||||
@"in": @"header",
|
||||
@"key": @"Authorization",
|
||||
@"value": [self getAccessToken]
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -246,14 +246,14 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
||||
```objc
|
||||
SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig];
|
||||
|
||||
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
|
||||
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
|
||||
|
||||
// Configure API key authorization: (authentication scheme: api_key)
|
||||
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
|
||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
|
||||
|
||||
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
|
||||
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
|
||||
|
||||
|
||||
NSNumber* petId = @789; // ID of pet that needs to be fetched
|
||||
|
||||
@ -283,7 +283,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user