Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
return [super initWithDictionary:dict error:err];
}
Class class = NSClassFromString([@"{{classPrefix}}" stringByAppendingString:discriminatedClassName]);
if(!class) {
class = NSClassFromString([@"{{classPrefix}}" stringByAppendingString:[discriminatedClassName capitalizedString]]);
}
if([self class ] == class) {
return [super initWithDictionary:dict error:err];
}
Expand Down
1 change: 0 additions & 1 deletion samples/client/petstore/objc/core-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi

- API version: 1.0.0
- Package version:
- Build date: 2016-08-28T17:01:51.939+03:00
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen

## Requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ -(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];

// Authentication setting
NSArray *authSettings = @[@"api_key", @"petstore_auth"];
NSArray *authSettings = @[@"petstore_auth", @"api_key"];

id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ -(NSNumber*) getPetByIdWithPetId: (NSNumber*) petId
NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]];

// Authentication setting
NSArray *authSettings = @[@"api_key", @"petstore_auth"];
NSArray *authSettings = @[@"petstore_auth", @"api_key"];

id bodyParam = nil;
NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init];
Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/objc/default/docs/SWGPetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -283,7 +283,7 @@ Name | Type | Description | Notes

### Authorization

[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)

### HTTP request headers

Expand Down