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];
|
{{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}}
|
{{/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}}
|
{{paramName}}{{/secondaryParam}}:{{paramName}}{{/allParams}}
|
||||||
{{#hasParams}}completionHandler: {{/hasParams}}^({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error)) {
|
{{#hasParams}}completionHandler: {{/hasParams}}^({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error) {
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
if (output) {
|
if (output) {
|
||||||
NSLog(@"%@", output);
|
NSLog(@"%@", output);
|
||||||
|
@ -6,7 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version:
|
- 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
|
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@ -74,9 +74,9 @@ SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to t
|
|||||||
|
|
||||||
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
|
SWGPetApi *apiInstance = [[SWGPetApi alloc] init];
|
||||||
|
|
||||||
// Add a new pet to the store
|
// Add a new pet to the store
|
||||||
[apiInstance addPetWithBody:body
|
[apiInstance addPetWithBody:body
|
||||||
completionHandler: ^(NSError* error)) {
|
completionHandler: ^(NSError* error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
NSLog(@"Error: %@", error);
|
NSLog(@"Error: %@", error);
|
||||||
}
|
}
|
||||||
@ -124,6 +124,12 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation For Authorization
|
## Documentation For Authorization
|
||||||
|
|
||||||
|
|
||||||
|
## api_key
|
||||||
|
|
||||||
|
- **Type**: API key
|
||||||
|
- **API key parameter name**: api_key
|
||||||
|
- **Location**: HTTP header
|
||||||
|
|
||||||
## petstore_auth
|
## petstore_auth
|
||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
@ -133,12 +139,6 @@ Class | Method | HTTP request | Description
|
|||||||
- **write:pets**: modify pets in your account
|
- **write:pets**: modify pets in your account
|
||||||
- **read:pets**: read your pets
|
- **read:pets**: read your pets
|
||||||
|
|
||||||
## api_key
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: api_key
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
|
|||||||
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
|
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];
|
||||||
|
|
||||||
// Authentication setting
|
// Authentication setting
|
||||||
NSArray *authSettings = @[@"petstore_auth", @"api_key"];
|
NSArray *authSettings = @[@"api_key", @"petstore_auth"];
|
||||||
|
|
||||||
id bodyParam = nil;
|
id bodyParam = nil;
|
||||||
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
|
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
|
||||||
|
@ -110,13 +110,6 @@
|
|||||||
|
|
||||||
- (NSDictionary *) authSettings {
|
- (NSDictionary *) authSettings {
|
||||||
return @{
|
return @{
|
||||||
@"petstore_auth":
|
|
||||||
@{
|
|
||||||
@"type": @"oauth",
|
|
||||||
@"in": @"header",
|
|
||||||
@"key": @"Authorization",
|
|
||||||
@"value": [self getAccessToken]
|
|
||||||
},
|
|
||||||
@"api_key":
|
@"api_key":
|
||||||
@{
|
@{
|
||||||
@"type": @"api_key",
|
@"type": @"api_key",
|
||||||
@ -124,6 +117,13 @@
|
|||||||
@"key": @"api_key",
|
@"key": @"api_key",
|
||||||
@"value": [self getApiKeyWithPrefix:@"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
|
```objc
|
||||||
SWGConfiguration *apiConfig = [SWGConfiguration sharedConfig];
|
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)
|
// Configure API key authorization: (authentication scheme: api_key)
|
||||||
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
|
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
|
||||||
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
|
//[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
|
NSNumber* petId = @789; // ID of pet that needs to be fetched
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### 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
|
### HTTP request headers
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user