diff --git a/bin/configs/other/openapi3/objc-core-data.yaml b/bin/configs/objc-core-data.yaml similarity index 84% rename from bin/configs/other/openapi3/objc-core-data.yaml rename to bin/configs/objc-core-data.yaml index 7d3e047bc2d..7625d0934ce 100644 --- a/bin/configs/other/openapi3/objc-core-data.yaml +++ b/bin/configs/objc-core-data.yaml @@ -3,5 +3,6 @@ outputDir: samples/client/petstore/objc/core-data inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.json templateDir: modules/openapi-generator/src/main/resources/objc additionalProperties: + classPrefix: SWG + podName: SwaggerClient coreData: "true" - appName: PetstoreClient diff --git a/bin/configs/other/openapi3/objc-default.yaml b/bin/configs/objc-default.yaml similarity index 83% rename from bin/configs/other/openapi3/objc-default.yaml rename to bin/configs/objc-default.yaml index fbdef1a0a22..5acc6b0c916 100644 --- a/bin/configs/other/openapi3/objc-default.yaml +++ b/bin/configs/objc-default.yaml @@ -3,4 +3,5 @@ outputDir: samples/client/petstore/objc/default inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.json templateDir: modules/openapi-generator/src/main/resources/objc additionalProperties: - appName: PetstoreClient + classPrefix: SWG + podName: SwaggerClient diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/FILES b/samples/client/petstore/objc/core-data/.openapi-generator/FILES index 6f6cd95849a..3a1c6b9364a 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/FILES +++ b/samples/client/petstore/objc/core-data/.openapi-generator/FILES @@ -35,6 +35,18 @@ SwaggerClient/Model/SWGCategoryManagedObject.h SwaggerClient/Model/SWGCategoryManagedObject.m SwaggerClient/Model/SWGCategoryManagedObjectBuilder.h SwaggerClient/Model/SWGCategoryManagedObjectBuilder.m +SwaggerClient/Model/SWGInlineObject.h +SwaggerClient/Model/SWGInlineObject.m +SwaggerClient/Model/SWGInlineObject1.h +SwaggerClient/Model/SWGInlineObject1.m +SwaggerClient/Model/SWGInlineObject1ManagedObject.h +SwaggerClient/Model/SWGInlineObject1ManagedObject.m +SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.h +SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.m +SwaggerClient/Model/SWGInlineObjectManagedObject.h +SwaggerClient/Model/SWGInlineObjectManagedObject.m +SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.h +SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.m SwaggerClient/Model/SWGModel.xcdatamodeld/.xccurrentversion SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel/contents SwaggerClient/Model/SWGOrder.h @@ -62,6 +74,8 @@ SwaggerClient/Model/SWGUserManagedObject.m SwaggerClient/Model/SWGUserManagedObjectBuilder.h SwaggerClient/Model/SWGUserManagedObjectBuilder.m docs/SWGCategory.md +docs/SWGInlineObject.md +docs/SWGInlineObject1.md docs/SWGOrder.md docs/SWGPet.md docs/SWGPetApi.md diff --git a/samples/client/petstore/objc/core-data/README.md b/samples/client/petstore/objc/core-data/README.md index a596656fa57..ac24d7bfc60 100644 --- a/samples/client/petstore/objc/core-data/README.md +++ b/samples/client/petstore/objc/core-data/README.md @@ -42,6 +42,8 @@ Import the following: #import // load models #import +#import +#import #import #import #import @@ -69,12 +71,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* *pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi *apiInstance = [[SWGPetApi alloc] init]; // Add a new pet to the store -[apiInstance addPetWithBody:body +[apiInstance addPetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); @@ -114,6 +116,8 @@ Class | Method | HTTP request | Description ## Documentation For Models - [SWGCategory](docs/SWGCategory.md) + - [SWGInlineObject](docs/SWGInlineObject.md) + - [SWGInlineObject1](docs/SWGInlineObject1.md) - [SWGOrder](docs/SWGOrder.md) - [SWGPet](docs/SWGPet.md) - [SWGTag](docs/SWGTag.md) diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h index 2753fa80578..1b1309c4876 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h @@ -26,12 +26,12 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Add a new pet to the store /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:405 message:"Invalid input" /// /// @return void --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; @@ -92,14 +92,14 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Update an existing pet /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:400 message:"Invalid ID supplied", /// code:404 message:"Pet not found", /// code:405 message:"Validation exception" /// /// @return void --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m index 49f8d5bc307..36fecb1dd44 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m @@ -52,11 +52,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Add a new pet to the store /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -83,7 +83,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -363,11 +363,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Update an existing pet /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -394,7 +394,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"PUT" diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h index 52bc7843275..e67aa3c8357 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h @@ -64,13 +64,13 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// Place an order for a pet /// /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// code:200 message:"successful operation", /// code:400 message:"Invalid Order" /// /// @return SWGOrder* --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder*) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m index 7d102a5c0d5..eaf254a6ab3 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m @@ -240,11 +240,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// Place an order for a pet /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// @returns SWGOrder* /// --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder*) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; @@ -263,7 +263,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -271,7 +271,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = order; return [self.apiClient requestWithPath: resourcePath method: @"POST" diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h index 63d35eb8960..98a3a1756d5 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h @@ -26,36 +26,36 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// Create user /// This can only be done by the logged in user. /// -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; @@ -116,14 +116,14 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// This can only be done by the logged in user. /// /// @param username name that need to be deleted -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// code:400 message:"Invalid user supplied", /// code:404 message:"User not found" /// /// @return void -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m index da0d9cb6831..94651c70282 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m @@ -52,11 +52,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Create user /// This can only be done by the logged in user. -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; @@ -75,7 +75,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -83,7 +83,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -107,11 +107,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; @@ -130,7 +130,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -138,7 +138,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -162,11 +162,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; @@ -185,7 +185,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -193,7 +193,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -470,12 +470,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// This can only be done by the logged in user. /// @param username name that need to be deleted /// -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// @returns void /// -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -508,7 +508,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -516,7 +516,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"PUT" diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject.h new file mode 100644 index 00000000000..1d3390dab8c --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject.h @@ -0,0 +1,32 @@ +#import +#import "SWGObject.h" + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + + + + +@protocol SWGInlineObject +@end + +@interface SWGInlineObject : SWGObject + +/* Updated name of the pet [optional] + */ +@property(nonatomic) NSString* name; +/* Updated status of the pet [optional] + */ +@property(nonatomic) NSString* status; + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject.m b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject.m new file mode 100644 index 00000000000..a10d7060973 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject.m @@ -0,0 +1,34 @@ +#import "SWGInlineObject.h" + +@implementation SWGInlineObject + +- (instancetype)init { + self = [super init]; + if (self) { + // initialize property's default value, if any + + } + return self; +} + + +/** + * Maps json key to property name. + * This method is used by `JSONModel`. + */ ++ (JSONKeyMapper *)keyMapper { + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"name": @"name", @"status": @"status" }]; +} + +/** + * Indicates whether the property with the given name is optional. + * If `propertyName` is optional, then return `YES`, otherwise return `NO`. + * This method is used by `JSONModel`. + */ ++ (BOOL)propertyIsOptional:(NSString *)propertyName { + + NSArray *optionalProperties = @[@"name", @"status"]; + return [optionalProperties containsObject:propertyName]; +} + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1.h new file mode 100644 index 00000000000..36d1a7194cd --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1.h @@ -0,0 +1,32 @@ +#import +#import "SWGObject.h" + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + + + + +@protocol SWGInlineObject1 +@end + +@interface SWGInlineObject1 : SWGObject + +/* Additional data to pass to server [optional] + */ +@property(nonatomic) NSString* additionalMetadata; +/* file to upload [optional] + */ +@property(nonatomic) NSURL* file; + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1.m b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1.m new file mode 100644 index 00000000000..825dbcc286a --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1.m @@ -0,0 +1,34 @@ +#import "SWGInlineObject1.h" + +@implementation SWGInlineObject1 + +- (instancetype)init { + self = [super init]; + if (self) { + // initialize property's default value, if any + + } + return self; +} + + +/** + * Maps json key to property name. + * This method is used by `JSONModel`. + */ ++ (JSONKeyMapper *)keyMapper { + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"additionalMetadata": @"additionalMetadata", @"file": @"file" }]; +} + +/** + * Indicates whether the property with the given name is optional. + * If `propertyName` is optional, then return `YES`, otherwise return `NO`. + * This method is used by `JSONModel`. + */ ++ (BOOL)propertyIsOptional:(NSString *)propertyName { + + NSArray *optionalProperties = @[@"additionalMetadata", @"file"]; + return [optionalProperties containsObject:propertyName]; +} + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObject.h new file mode 100644 index 00000000000..67d37a6fc9c --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObject.h @@ -0,0 +1,36 @@ +#import +#import + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + + + +NS_ASSUME_NONNULL_BEGIN + +@interface SWGInlineObject1ManagedObject : NSManagedObject + +/* Additional data to pass to server [optional] + */ +@property (nullable, nonatomic, retain) NSString* additionalMetadata; +/* file to upload [optional] + */ +@property (nullable, nonatomic, retain) NSURL* file; +@end + +@interface SWGInlineObject1ManagedObject (GeneratedAccessors) + +@end + + +NS_ASSUME_NONNULL_END diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObject.m b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObject.m new file mode 100644 index 00000000000..8b83f2e40b9 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObject.m @@ -0,0 +1,12 @@ +#import "SWGInlineObject1ManagedObject.h" + +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +@implementation SWGInlineObject1ManagedObject + +@dynamic additionalMetadata; +@dynamic file; +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.h new file mode 100644 index 00000000000..35f82beb9a9 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.h @@ -0,0 +1,35 @@ +#import +#import + + +#import "SWGInlineObject1ManagedObject.h" +#import "SWGInlineObject1.h" + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + +@interface SWGInlineObject1ManagedObjectBuilder : NSObject + + + +-(SWGInlineObject1ManagedObject*)createNewSWGInlineObject1ManagedObjectInContext:(NSManagedObjectContext*)context; + +-(SWGInlineObject1ManagedObject*)SWGInlineObject1ManagedObjectFromSWGInlineObject1:(SWGInlineObject1*)object context:(NSManagedObjectContext*)context; + +-(void)updateSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)object withSWGInlineObject1:(SWGInlineObject1*)object2; + +-(SWGInlineObject1*)SWGInlineObject1FromSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)obj; + +-(void)updateSWGInlineObject1:(SWGInlineObject1*)object withSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)object2; + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.m b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.m new file mode 100644 index 00000000000..75031ff775d --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObject1ManagedObjectBuilder.m @@ -0,0 +1,55 @@ + + +#import "SWGInlineObject1ManagedObjectBuilder.h" + +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +@implementation SWGInlineObject1ManagedObjectBuilder + +-(instancetype)init { + self = [super init]; + if (self != nil) { + } + return self; +} + +-(SWGInlineObject1ManagedObject*)createNewSWGInlineObject1ManagedObjectInContext:(NSManagedObjectContext*)context { + SWGInlineObject1ManagedObject *managedObject = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass([SWGInlineObject1ManagedObject class]) inManagedObjectContext:context]; + return managedObject; +} + +-(SWGInlineObject1ManagedObject*)SWGInlineObject1ManagedObjectFromSWGInlineObject1:(SWGInlineObject1*)object context:(NSManagedObjectContext*)context { + SWGInlineObject1ManagedObject* newSWGInlineObject1 = [self createNewSWGInlineObject1ManagedObjectInContext:context]; + [self updateSWGInlineObject1ManagedObject:newSWGInlineObject1 withSWGInlineObject1:object]; + return newSWGInlineObject1; +} + +-(void)updateSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)managedObject withSWGInlineObject1:(SWGInlineObject1*)object { + if(!managedObject || !object) { + return; + } + NSManagedObjectContext* context = managedObject.managedObjectContext; + managedObject.additionalMetadata = [object.additionalMetadata copy]; + managedObject.file = [object.file copy]; + +} + +-(SWGInlineObject1*)SWGInlineObject1FromSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)obj { + if(!obj) { + return nil; + } + SWGInlineObject1* newSWGInlineObject1 = [[SWGInlineObject1 alloc] init]; + [self updateSWGInlineObject1:newSWGInlineObject1 withSWGInlineObject1ManagedObject:obj]; + return newSWGInlineObject1; +} + +-(void)updateSWGInlineObject1:(SWGInlineObject1*)newSWGInlineObject1 withSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)obj { + newSWGInlineObject1.additionalMetadata = [obj.additionalMetadata copy]; + newSWGInlineObject1.file = [obj.file copy]; +} + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObject.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObject.h new file mode 100644 index 00000000000..c7c95fca41c --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObject.h @@ -0,0 +1,36 @@ +#import +#import + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + + + +NS_ASSUME_NONNULL_BEGIN + +@interface SWGInlineObjectManagedObject : NSManagedObject + +/* Updated name of the pet [optional] + */ +@property (nullable, nonatomic, retain) NSString* name; +/* Updated status of the pet [optional] + */ +@property (nullable, nonatomic, retain) NSString* status; +@end + +@interface SWGInlineObjectManagedObject (GeneratedAccessors) + +@end + + +NS_ASSUME_NONNULL_END diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObject.m b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObject.m new file mode 100644 index 00000000000..b1eaec9c492 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObject.m @@ -0,0 +1,12 @@ +#import "SWGInlineObjectManagedObject.h" + +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +@implementation SWGInlineObjectManagedObject + +@dynamic name; +@dynamic status; +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.h b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.h new file mode 100644 index 00000000000..7937b22ea1d --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.h @@ -0,0 +1,35 @@ +#import +#import + + +#import "SWGInlineObjectManagedObject.h" +#import "SWGInlineObject.h" + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + +@interface SWGInlineObjectManagedObjectBuilder : NSObject + + + +-(SWGInlineObjectManagedObject*)createNewSWGInlineObjectManagedObjectInContext:(NSManagedObjectContext*)context; + +-(SWGInlineObjectManagedObject*)SWGInlineObjectManagedObjectFromSWGInlineObject:(SWGInlineObject*)object context:(NSManagedObjectContext*)context; + +-(void)updateSWGInlineObjectManagedObject:(SWGInlineObjectManagedObject*)object withSWGInlineObject:(SWGInlineObject*)object2; + +-(SWGInlineObject*)SWGInlineObjectFromSWGInlineObjectManagedObject:(SWGInlineObjectManagedObject*)obj; + +-(void)updateSWGInlineObject:(SWGInlineObject*)object withSWGInlineObjectManagedObject:(SWGInlineObjectManagedObject*)object2; + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.m b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.m new file mode 100644 index 00000000000..7d15720a546 --- /dev/null +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGInlineObjectManagedObjectBuilder.m @@ -0,0 +1,55 @@ + + +#import "SWGInlineObjectManagedObjectBuilder.h" + +/** +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +@implementation SWGInlineObjectManagedObjectBuilder + +-(instancetype)init { + self = [super init]; + if (self != nil) { + } + return self; +} + +-(SWGInlineObjectManagedObject*)createNewSWGInlineObjectManagedObjectInContext:(NSManagedObjectContext*)context { + SWGInlineObjectManagedObject *managedObject = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass([SWGInlineObjectManagedObject class]) inManagedObjectContext:context]; + return managedObject; +} + +-(SWGInlineObjectManagedObject*)SWGInlineObjectManagedObjectFromSWGInlineObject:(SWGInlineObject*)object context:(NSManagedObjectContext*)context { + SWGInlineObjectManagedObject* newSWGInlineObject = [self createNewSWGInlineObjectManagedObjectInContext:context]; + [self updateSWGInlineObjectManagedObject:newSWGInlineObject withSWGInlineObject:object]; + return newSWGInlineObject; +} + +-(void)updateSWGInlineObjectManagedObject:(SWGInlineObjectManagedObject*)managedObject withSWGInlineObject:(SWGInlineObject*)object { + if(!managedObject || !object) { + return; + } + NSManagedObjectContext* context = managedObject.managedObjectContext; + managedObject.name = [object.name copy]; + managedObject.status = [object.status copy]; + +} + +-(SWGInlineObject*)SWGInlineObjectFromSWGInlineObjectManagedObject:(SWGInlineObjectManagedObject*)obj { + if(!obj) { + return nil; + } + SWGInlineObject* newSWGInlineObject = [[SWGInlineObject alloc] init]; + [self updateSWGInlineObject:newSWGInlineObject withSWGInlineObjectManagedObject:obj]; + return newSWGInlineObject; +} + +-(void)updateSWGInlineObject:(SWGInlineObject*)newSWGInlineObject withSWGInlineObjectManagedObject:(SWGInlineObjectManagedObject*)obj { + newSWGInlineObject.name = [obj.name copy]; + newSWGInlineObject.status = [obj.status copy]; +} + +@end diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel/contents b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel/contents index 4ec7a3b456b..35f1c665a08 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel/contents +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel/contents @@ -5,6 +5,14 @@ + + + + + + + + diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index 02aab1261c1..462f141372d 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -214,13 +214,12 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Example" */; buildPhases = ( - 841AD69C2F0A6609E3057F05 /* 📦 Check Pods Manifest.lock */, + 841AD69C2F0A6609E3057F05 /* [CP] Check Pods Manifest.lock */, 799E7E29D924C30424DFBA28 /* [CP] Check Pods Manifest.lock */, 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */, - 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */, FF3F107CF27E0A54D86C49F5 /* 📦 Embed Pods Frameworks */, DA89ADFB80DCCB6691DED12D /* 📦 Copy Pods Resources */, ); @@ -237,15 +236,14 @@ isa = PBXNativeTarget; buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "SwaggerClient_Tests" */; buildPhases = ( - E0F523B17966072A199F040E /* 📦 Check Pods Manifest.lock */, + E0F523B17966072A199F040E /* [CP] Check Pods Manifest.lock */, 7B069562A9F91E498732474F /* [CP] Check Pods Manifest.lock */, 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */, - 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */, AA7CAD658C61D6EBA222B5F8 /* 📦 Embed Pods Frameworks */, - E994E0232EFD15F8EE665A4D /* 📦 Copy Pods Resources */, + E994E0232EFD15F8EE665A4D /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -309,49 +307,24 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh", + "${PODS_ROOT}/../../SwaggerClient/Model/SWGModel.xcdatamodeld", + "${PODS_ROOT}/../../SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SWGModel.momd", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SWGModel.mom", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; 799E7E29D924C30424DFBA28 /* [CP] Check Pods Manifest.lock */ = { @@ -384,19 +357,22 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 841AD69C2F0A6609E3057F05 /* 📦 Check Pods Manifest.lock */ = { + 841AD69C2F0A6609E3057F05 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; AA7CAD658C61D6EBA222B5F8 /* 📦 Embed Pods Frameworks */ = { @@ -429,19 +405,22 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - E0F523B17966072A199F040E /* 📦 Check Pods Manifest.lock */ = { + E0F523B17966072A199F040E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */ = { @@ -450,16 +429,21 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh", + "${PODS_ROOT}/../../SwaggerClient/Model/SWGModel.xcdatamodeld", + "${PODS_ROOT}/../../SwaggerClient/Model/SWGModel.xcdatamodeld/SWGModel.xcdatamodel", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SWGModel.momd", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SWGModel.mom", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - E994E0232EFD15F8EE665A4D /* 📦 Copy Pods Resources */ = { + E994E0232EFD15F8EE665A4D /* Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -474,21 +458,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; FF3F107CF27E0A54D86C49F5 /* 📦 Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/samples/client/petstore/objc/core-data/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/objc/core-data/SwaggerClientTests/run_xcodebuild.sh index 7553a165a4c..5f88b8fcd74 100755 --- a/samples/client/petstore/objc/core-data/SwaggerClientTests/run_xcodebuild.sh +++ b/samples/client/petstore/objc/core-data/SwaggerClientTests/run_xcodebuild.sh @@ -1,3 +1,3 @@ #!/bin/sh -pod install && xcodebuild test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient-Example" -destination "platform=iOS Simulator,name=iPhone 5s,OS=9.3" | xcpretty && exit ${PIPESTATUS[0]} +pod install && xcodebuild test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient-Example" -destination "platform=iOS Simulator,name=iPhone 8,OS=13.1" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/objc/core-data/docs/SWGInlineObject.md b/samples/client/petstore/objc/core-data/docs/SWGInlineObject.md new file mode 100644 index 00000000000..1d66818927f --- /dev/null +++ b/samples/client/petstore/objc/core-data/docs/SWGInlineObject.md @@ -0,0 +1,11 @@ +# SWGInlineObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **NSString*** | Updated name of the pet | [optional] +**status** | **NSString*** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/objc/core-data/docs/SWGInlineObject1.md b/samples/client/petstore/objc/core-data/docs/SWGInlineObject1.md new file mode 100644 index 00000000000..c59e8485885 --- /dev/null +++ b/samples/client/petstore/objc/core-data/docs/SWGInlineObject1.md @@ -0,0 +1,11 @@ +# SWGInlineObject1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **NSString*** | Additional data to pass to server | [optional] +**file** | **NSURL*** | file to upload | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/objc/core-data/docs/SWGPetApi.md b/samples/client/petstore/objc/core-data/docs/SWGPetApi.md index 9f426a7e5ac..e2dde91d798 100644 --- a/samples/client/petstore/objc/core-data/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/core-data/docs/SWGPetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **addPet** ```objc --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; ``` @@ -30,12 +30,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; // Add a new pet to the store -[apiInstance addPetWithBody:body +[apiInstance addPetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGPetApi->addPet: %@", error); @@ -47,7 +47,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] + **pet** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] ### Return type @@ -290,7 +290,7 @@ Name | Type | Description | Notes # **updatePet** ```objc --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; ``` @@ -304,12 +304,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; // Update an existing pet -[apiInstance updatePetWithBody:body +[apiInstance updatePetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGPetApi->updatePet: %@", error); @@ -321,7 +321,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] + **pet** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] ### Return type diff --git a/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md b/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md index cebab19d2bf..0aec03add1d 100644 --- a/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md @@ -162,7 +162,7 @@ No authorization required # **placeOrder** ```objc --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder*) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; ``` @@ -171,12 +171,12 @@ Place an order for a pet ### Example ```objc -SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) +SWGOrder* order = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; // Place an order for a pet -[apiInstance placeOrderWithBody:body +[apiInstance placeOrderWithOrder:order completionHandler: ^(SWGOrder* output, NSError* error) { if (output) { NSLog(@"%@", output); @@ -191,7 +191,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional] + **order** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional] ### Return type @@ -203,7 +203,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/xml [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/objc/core-data/docs/SWGUserApi.md b/samples/client/petstore/objc/core-data/docs/SWGUserApi.md index f512a4fdeb6..549a9e0f72c 100644 --- a/samples/client/petstore/objc/core-data/docs/SWGUserApi.md +++ b/samples/client/petstore/objc/core-data/docs/SWGUserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** ```objc --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -27,12 +27,12 @@ This can only be done by the logged in user. ### Example ```objc -SWGUser* body = [[SWGUser alloc] init]; // Created user object (optional) +SWGUser* user = [[SWGUser alloc] init]; // Created user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Create user -[apiInstance createUserWithBody:body +[apiInstance createUserWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUser: %@", error); @@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGUser***](SWGUser.md)| Created user object | [optional] + **user** | [**SWGUser***](SWGUser.md)| Created user object | [optional] ### Return type @@ -56,14 +56,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **createUsersWithArrayInput** ```objc --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -72,12 +72,12 @@ Creates list of users with given input array ### Example ```objc -NSArray* body = @[[[SWGUser alloc] init]]; // List of user object (optional) +NSArray* user = @[[[SWGUser alloc] init]]; // List of user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Creates list of users with given input array -[apiInstance createUsersWithArrayInputWithBody:body +[apiInstance createUsersWithArrayInputWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUsersWithArrayInput: %@", error); @@ -89,7 +89,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] + **user** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] ### Return type @@ -101,14 +101,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **createUsersWithListInput** ```objc --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -117,12 +117,12 @@ Creates list of users with given input array ### Example ```objc -NSArray* body = @[[[SWGUser alloc] init]]; // List of user object (optional) +NSArray* user = @[[[SWGUser alloc] init]]; // List of user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Creates list of users with given input array -[apiInstance createUsersWithListInputWithBody:body +[apiInstance createUsersWithListInputWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUsersWithListInput: %@", error); @@ -134,7 +134,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] + **user** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] ### Return type @@ -146,7 +146,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -342,7 +342,7 @@ No authorization required # **updateUser** ```objc -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -354,13 +354,13 @@ This can only be done by the logged in user. ```objc NSString* username = @"username_example"; // name that need to be deleted -SWGUser* body = [[SWGUser alloc] init]; // Updated user object (optional) +SWGUser* user = [[SWGUser alloc] init]; // Updated user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Updated user [apiInstance updateUserWithUsername:username - body:body + user:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->updateUser: %@", error); @@ -373,7 +373,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **NSString***| name that need to be deleted | - **body** | [**SWGUser***](SWGUser.md)| Updated user object | [optional] + **user** | [**SWGUser***](SWGUser.md)| Updated user object | [optional] ### Return type @@ -385,7 +385,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/objc/default/.openapi-generator/FILES b/samples/client/petstore/objc/default/.openapi-generator/FILES index 02311083874..d0985156c04 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/FILES +++ b/samples/client/petstore/objc/default/.openapi-generator/FILES @@ -31,6 +31,10 @@ SwaggerClient/Core/SWGSanitizer.h SwaggerClient/Core/SWGSanitizer.m SwaggerClient/Model/SWGCategory.h SwaggerClient/Model/SWGCategory.m +SwaggerClient/Model/SWGInlineObject.h +SwaggerClient/Model/SWGInlineObject.m +SwaggerClient/Model/SWGInlineObject1.h +SwaggerClient/Model/SWGInlineObject1.m SwaggerClient/Model/SWGOrder.h SwaggerClient/Model/SWGOrder.m SwaggerClient/Model/SWGPet.h @@ -40,6 +44,8 @@ SwaggerClient/Model/SWGTag.m SwaggerClient/Model/SWGUser.h SwaggerClient/Model/SWGUser.m docs/SWGCategory.md +docs/SWGInlineObject.md +docs/SWGInlineObject1.md docs/SWGOrder.md docs/SWGPet.md docs/SWGPetApi.md diff --git a/samples/client/petstore/objc/default/README.md b/samples/client/petstore/objc/default/README.md index a596656fa57..ac24d7bfc60 100644 --- a/samples/client/petstore/objc/default/README.md +++ b/samples/client/petstore/objc/default/README.md @@ -42,6 +42,8 @@ Import the following: #import // load models #import +#import +#import #import #import #import @@ -69,12 +71,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* *pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi *apiInstance = [[SWGPetApi alloc] init]; // Add a new pet to the store -[apiInstance addPetWithBody:body +[apiInstance addPetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); @@ -114,6 +116,8 @@ Class | Method | HTTP request | Description ## Documentation For Models - [SWGCategory](docs/SWGCategory.md) + - [SWGInlineObject](docs/SWGInlineObject.md) + - [SWGInlineObject1](docs/SWGInlineObject1.md) - [SWGOrder](docs/SWGOrder.md) - [SWGPet](docs/SWGPet.md) - [SWGTag](docs/SWGTag.md) diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h index 2753fa80578..1b1309c4876 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h @@ -26,12 +26,12 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Add a new pet to the store /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:405 message:"Invalid input" /// /// @return void --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; @@ -92,14 +92,14 @@ extern NSInteger kSWGPetApiMissingParamErrorCode; /// Update an existing pet /// /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// code:400 message:"Invalid ID supplied", /// code:404 message:"Pet not found", /// code:405 message:"Validation exception" /// /// @return void --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m index 49f8d5bc307..36fecb1dd44 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m @@ -52,11 +52,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Add a new pet to the store /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -83,7 +83,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -363,11 +363,11 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; /// /// Update an existing pet /// -/// @param body Pet object that needs to be added to the store (optional) +/// @param pet Pet object that needs to be added to the store (optional) /// /// @returns void /// --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/pet"]; @@ -394,7 +394,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = pet; return [self.apiClient requestWithPath: resourcePath method: @"PUT" diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h index 52bc7843275..e67aa3c8357 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h @@ -64,13 +64,13 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// Place an order for a pet /// /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// code:200 message:"successful operation", /// code:400 message:"Invalid Order" /// /// @return SWGOrder* --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder*) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m index 7d102a5c0d5..eaf254a6ab3 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m @@ -240,11 +240,11 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// Place an order for a pet /// -/// @param body order placed for purchasing the pet (optional) +/// @param order order placed for purchasing the pet (optional) /// /// @returns SWGOrder* /// --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder*) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/store/order"]; @@ -263,7 +263,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -271,7 +271,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = order; return [self.apiClient requestWithPath: resourcePath method: @"POST" diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h index 63d35eb8960..98a3a1756d5 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h @@ -26,36 +26,36 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// Create user /// This can only be done by the logged in user. /// -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; /// Creates list of users with given input array /// /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// code:0 message:"successful operation" /// /// @return void --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; @@ -116,14 +116,14 @@ extern NSInteger kSWGUserApiMissingParamErrorCode; /// This can only be done by the logged in user. /// /// @param username name that need to be deleted -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// code:400 message:"Invalid user supplied", /// code:404 message:"User not found" /// /// @return void -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m index da0d9cb6831..94651c70282 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m @@ -52,11 +52,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Create user /// This can only be done by the logged in user. -/// @param body Created user object (optional) +/// @param user Created user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user"]; @@ -75,7 +75,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -83,7 +83,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -107,11 +107,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithArray"]; @@ -130,7 +130,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -138,7 +138,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -162,11 +162,11 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// /// Creates list of users with given input array /// -/// @param body List of user object (optional) +/// @param user List of user object (optional) /// /// @returns void /// --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler { NSMutableString* resourcePath = [NSMutableString stringWithFormat:@"/user/createWithList"]; @@ -185,7 +185,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -193,7 +193,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"POST" @@ -470,12 +470,12 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; /// This can only be done by the logged in user. /// @param username name that need to be deleted /// -/// @param body Updated user object (optional) +/// @param user Updated user object (optional) /// /// @returns void /// -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler { // verify the required parameter 'username' is set if (username == nil) { @@ -508,7 +508,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; NSString *responseContentType = [[acceptHeader componentsSeparatedByString:@", "] firstObject] ?: @""; // request content type - NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[]]; + NSString *requestContentType = [self.apiClient.sanitizer selectHeaderContentType:@[@"application/json"]]; // Authentication setting NSArray *authSettings = @[]; @@ -516,7 +516,7 @@ NSInteger kSWGUserApiMissingParamErrorCode = 234513; id bodyParam = nil; NSMutableDictionary *formParams = [[NSMutableDictionary alloc] init]; NSMutableDictionary *localVarFiles = [[NSMutableDictionary alloc] init]; - bodyParam = body; + bodyParam = user; return [self.apiClient requestWithPath: resourcePath method: @"PUT" diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject.h new file mode 100644 index 00000000000..1d3390dab8c --- /dev/null +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject.h @@ -0,0 +1,32 @@ +#import +#import "SWGObject.h" + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + + + + +@protocol SWGInlineObject +@end + +@interface SWGInlineObject : SWGObject + +/* Updated name of the pet [optional] + */ +@property(nonatomic) NSString* name; +/* Updated status of the pet [optional] + */ +@property(nonatomic) NSString* status; + +@end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject.m b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject.m new file mode 100644 index 00000000000..a10d7060973 --- /dev/null +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject.m @@ -0,0 +1,34 @@ +#import "SWGInlineObject.h" + +@implementation SWGInlineObject + +- (instancetype)init { + self = [super init]; + if (self) { + // initialize property's default value, if any + + } + return self; +} + + +/** + * Maps json key to property name. + * This method is used by `JSONModel`. + */ ++ (JSONKeyMapper *)keyMapper { + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"name": @"name", @"status": @"status" }]; +} + +/** + * Indicates whether the property with the given name is optional. + * If `propertyName` is optional, then return `YES`, otherwise return `NO`. + * This method is used by `JSONModel`. + */ ++ (BOOL)propertyIsOptional:(NSString *)propertyName { + + NSArray *optionalProperties = @[@"name", @"status"]; + return [optionalProperties containsObject:propertyName]; +} + +@end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject1.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject1.h new file mode 100644 index 00000000000..36d1a7194cd --- /dev/null +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject1.h @@ -0,0 +1,32 @@ +#import +#import "SWGObject.h" + +/** +* OpenAPI Petstore +* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters +* +* The version of the OpenAPI document: 1.0.0 +* +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + + + + +@protocol SWGInlineObject1 +@end + +@interface SWGInlineObject1 : SWGObject + +/* Additional data to pass to server [optional] + */ +@property(nonatomic) NSString* additionalMetadata; +/* file to upload [optional] + */ +@property(nonatomic) NSURL* file; + +@end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject1.m b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject1.m new file mode 100644 index 00000000000..825dbcc286a --- /dev/null +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGInlineObject1.m @@ -0,0 +1,34 @@ +#import "SWGInlineObject1.h" + +@implementation SWGInlineObject1 + +- (instancetype)init { + self = [super init]; + if (self) { + // initialize property's default value, if any + + } + return self; +} + + +/** + * Maps json key to property name. + * This method is used by `JSONModel`. + */ ++ (JSONKeyMapper *)keyMapper { + return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"additionalMetadata": @"additionalMetadata", @"file": @"file" }]; +} + +/** + * Indicates whether the property with the given name is optional. + * If `propertyName` is optional, then return `YES`, otherwise return `NO`. + * This method is used by `JSONModel`. + */ ++ (BOOL)propertyIsOptional:(NSString *)propertyName { + + NSArray *optionalProperties = @[@"additionalMetadata", @"file"]; + return [optionalProperties containsObject:propertyName]; +} + +@end diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj index c2b960038e1..6407077fccd 100644 --- a/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ b/samples/client/petstore/objc/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -236,9 +236,6 @@ 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, - 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */, - 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */, - DA8DD6AAE903F2CD38F2D9D5 /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -257,9 +254,6 @@ 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, - E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */, - 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */, - FD42985CC653969FE997DEC9 /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -323,64 +317,22 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 111D7956304BD6E860AA8709 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 183E54C09C54DAEB54B2546F /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 429AF5C69E165ED75311B4B0 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 799E7E29D924C30424DFBA28 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 7B069562A9F91E498732474F /* [CP] Check Pods Manifest.lock */ = { @@ -389,58 +341,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - DA8DD6AAE903F2CD38F2D9D5 /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Example/Pods-SwaggerClient_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E337D7E459CCFFDF27046FFC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - FD42985CC653969FE997DEC9 /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient_Tests/Pods-SwaggerClient_Tests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/samples/client/petstore/objc/default/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/objc/default/SwaggerClientTests/run_xcodebuild.sh index 7553a165a4c..5f88b8fcd74 100755 --- a/samples/client/petstore/objc/default/SwaggerClientTests/run_xcodebuild.sh +++ b/samples/client/petstore/objc/default/SwaggerClientTests/run_xcodebuild.sh @@ -1,3 +1,3 @@ #!/bin/sh -pod install && xcodebuild test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient-Example" -destination "platform=iOS Simulator,name=iPhone 5s,OS=9.3" | xcpretty && exit ${PIPESTATUS[0]} +pod install && xcodebuild test -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient-Example" -destination "platform=iOS Simulator,name=iPhone 8,OS=13.1" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/objc/default/docs/SWGInlineObject.md b/samples/client/petstore/objc/default/docs/SWGInlineObject.md new file mode 100644 index 00000000000..1d66818927f --- /dev/null +++ b/samples/client/petstore/objc/default/docs/SWGInlineObject.md @@ -0,0 +1,11 @@ +# SWGInlineObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **NSString*** | Updated name of the pet | [optional] +**status** | **NSString*** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/objc/default/docs/SWGInlineObject1.md b/samples/client/petstore/objc/default/docs/SWGInlineObject1.md new file mode 100644 index 00000000000..c59e8485885 --- /dev/null +++ b/samples/client/petstore/objc/default/docs/SWGInlineObject1.md @@ -0,0 +1,11 @@ +# SWGInlineObject1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additionalMetadata** | **NSString*** | Additional data to pass to server | [optional] +**file** | **NSURL*** | file to upload | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/objc/default/docs/SWGPetApi.md b/samples/client/petstore/objc/default/docs/SWGPetApi.md index 9f426a7e5ac..e2dde91d798 100644 --- a/samples/client/petstore/objc/default/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/default/docs/SWGPetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **addPet** ```objc --(NSURLSessionTask*) addPetWithBody: (SWGPet*) body +-(NSURLSessionTask*) addPetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; ``` @@ -30,12 +30,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; // Add a new pet to the store -[apiInstance addPetWithBody:body +[apiInstance addPetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGPetApi->addPet: %@", error); @@ -47,7 +47,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] + **pet** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] ### Return type @@ -290,7 +290,7 @@ Name | Type | Description | Notes # **updatePet** ```objc --(NSURLSessionTask*) updatePetWithBody: (SWGPet*) body +-(NSURLSessionTask*) updatePetWithPet: (SWGPet*) pet completionHandler: (void (^)(NSError* error)) handler; ``` @@ -304,12 +304,12 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* pet = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; // Update an existing pet -[apiInstance updatePetWithBody:body +[apiInstance updatePetWithPet:pet completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGPetApi->updatePet: %@", error); @@ -321,7 +321,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] + **pet** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] ### Return type diff --git a/samples/client/petstore/objc/default/docs/SWGStoreApi.md b/samples/client/petstore/objc/default/docs/SWGStoreApi.md index cebab19d2bf..0aec03add1d 100644 --- a/samples/client/petstore/objc/default/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/default/docs/SWGStoreApi.md @@ -162,7 +162,7 @@ No authorization required # **placeOrder** ```objc --(NSURLSessionTask*) placeOrderWithBody: (SWGOrder*) body +-(NSURLSessionTask*) placeOrderWithOrder: (SWGOrder*) order completionHandler: (void (^)(SWGOrder* output, NSError* error)) handler; ``` @@ -171,12 +171,12 @@ Place an order for a pet ### Example ```objc -SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) +SWGOrder* order = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; // Place an order for a pet -[apiInstance placeOrderWithBody:body +[apiInstance placeOrderWithOrder:order completionHandler: ^(SWGOrder* output, NSError* error) { if (output) { NSLog(@"%@", output); @@ -191,7 +191,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional] + **order** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional] ### Return type @@ -203,7 +203,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/xml [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/objc/default/docs/SWGUserApi.md b/samples/client/petstore/objc/default/docs/SWGUserApi.md index f512a4fdeb6..549a9e0f72c 100644 --- a/samples/client/petstore/objc/default/docs/SWGUserApi.md +++ b/samples/client/petstore/objc/default/docs/SWGUserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** ```objc --(NSURLSessionTask*) createUserWithBody: (SWGUser*) body +-(NSURLSessionTask*) createUserWithUser: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -27,12 +27,12 @@ This can only be done by the logged in user. ### Example ```objc -SWGUser* body = [[SWGUser alloc] init]; // Created user object (optional) +SWGUser* user = [[SWGUser alloc] init]; // Created user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Create user -[apiInstance createUserWithBody:body +[apiInstance createUserWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUser: %@", error); @@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGUser***](SWGUser.md)| Created user object | [optional] + **user** | [**SWGUser***](SWGUser.md)| Created user object | [optional] ### Return type @@ -56,14 +56,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **createUsersWithArrayInput** ```objc --(NSURLSessionTask*) createUsersWithArrayInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithArrayInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -72,12 +72,12 @@ Creates list of users with given input array ### Example ```objc -NSArray* body = @[[[SWGUser alloc] init]]; // List of user object (optional) +NSArray* user = @[[[SWGUser alloc] init]]; // List of user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Creates list of users with given input array -[apiInstance createUsersWithArrayInputWithBody:body +[apiInstance createUsersWithArrayInputWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUsersWithArrayInput: %@", error); @@ -89,7 +89,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] + **user** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] ### Return type @@ -101,14 +101,14 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **createUsersWithListInput** ```objc --(NSURLSessionTask*) createUsersWithListInputWithBody: (NSArray*) body +-(NSURLSessionTask*) createUsersWithListInputWithUser: (NSArray*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -117,12 +117,12 @@ Creates list of users with given input array ### Example ```objc -NSArray* body = @[[[SWGUser alloc] init]]; // List of user object (optional) +NSArray* user = @[[[SWGUser alloc] init]]; // List of user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Creates list of users with given input array -[apiInstance createUsersWithListInputWithBody:body +[apiInstance createUsersWithListInputWithUser:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->createUsersWithListInput: %@", error); @@ -134,7 +134,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] + **user** | [**NSArray<SWGUser>***](SWGUser.md)| List of user object | [optional] ### Return type @@ -146,7 +146,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -342,7 +342,7 @@ No authorization required # **updateUser** ```objc -(NSURLSessionTask*) updateUserWithUsername: (NSString*) username - body: (SWGUser*) body + user: (SWGUser*) user completionHandler: (void (^)(NSError* error)) handler; ``` @@ -354,13 +354,13 @@ This can only be done by the logged in user. ```objc NSString* username = @"username_example"; // name that need to be deleted -SWGUser* body = [[SWGUser alloc] init]; // Updated user object (optional) +SWGUser* user = [[SWGUser alloc] init]; // Updated user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; // Updated user [apiInstance updateUserWithUsername:username - body:body + user:user completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error calling SWGUserApi->updateUser: %@", error); @@ -373,7 +373,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **NSString***| name that need to be deleted | - **body** | [**SWGUser***](SWGUser.md)| Updated user object | [optional] + **user** | [**SWGUser***](SWGUser.md)| Updated user object | [optional] ### Return type @@ -385,7 +385,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)