diff --git a/modules/swagger-codegen/src/main/resources/objc/model-header.mustache b/modules/swagger-codegen/src/main/resources/objc/model-header.mustache index 04570e71a2f..07f671c99ff 100644 --- a/modules/swagger-codegen/src/main/resources/objc/model-header.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/model-header.mustache @@ -5,6 +5,11 @@ {{#imports}}#import "{{import}}.h" {{/imports}} +{{#imports}} +@protocol {{import}}; +@class {{import}}; +{{/imports}} + {{newline}} {{#models}} {{#model}} diff --git a/samples/client/petstore/objc/default/README.md b/samples/client/petstore/objc/default/README.md index 7ffa53d7cd8..aca3b5b6e33 100644 --- a/samples/client/petstore/objc/default/README.md +++ b/samples/client/petstore/objc/default/README.md @@ -69,7 +69,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* *body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi *apiInstance = [[SWGPetApi alloc] init]; diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h index aba4f712480..160295b0f3a 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGCategory.h @@ -16,6 +16,7 @@ + @protocol SWGCategory @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h index d8a48516b78..c0321482a09 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGOrder.h @@ -16,6 +16,7 @@ + @protocol SWGOrder @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h index 0db2ead28dc..4b026d071c1 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGPet.h @@ -16,6 +16,11 @@ #import "SWGCategory.h" #import "SWGTag.h" +@protocol SWGCategory; +@class SWGCategory; +@protocol SWGTag; +@class SWGTag; + @protocol SWGPet diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h index 05844b7438e..6a742d3c9dd 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGTag.h @@ -16,6 +16,7 @@ + @protocol SWGTag @end diff --git a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h index 4db4b03f1b4..31a524dc7f0 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Model/SWGUser.h @@ -16,6 +16,7 @@ + @protocol SWGUser @end diff --git a/samples/client/petstore/objc/default/docs/SWGPetApi.md b/samples/client/petstore/objc/default/docs/SWGPetApi.md index 655141ba4c1..8740be886b3 100644 --- a/samples/client/petstore/objc/default/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/default/docs/SWGPetApi.md @@ -32,7 +32,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; @@ -49,7 +49,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](Pet.md)| Pet object that needs to be added to the store | [optional] + **body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional] ### Return type @@ -310,7 +310,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; -SWGPet* body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional) +SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional) SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; @@ -327,7 +327,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGPet***](Pet.md)| Pet object that needs to be added to the store | [optional] + **body** | [**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 4463984e0d7..2fc6c81ec75 100644 --- a/samples/client/petstore/objc/default/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/default/docs/SWGStoreApi.md @@ -173,7 +173,7 @@ Place an order for a pet ### Example ```objc -SWGOrder* body = [[Order alloc] init]; // order placed for purchasing the pet (optional) +SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; @@ -193,7 +193,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGOrder***](Order.md)| order placed for purchasing the pet | [optional] + **body** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional] ### Return type diff --git a/samples/client/petstore/objc/default/docs/SWGUserApi.md b/samples/client/petstore/objc/default/docs/SWGUserApi.md index 618aa14b814..108f6b6aa54 100644 --- a/samples/client/petstore/objc/default/docs/SWGUserApi.md +++ b/samples/client/petstore/objc/default/docs/SWGUserApi.md @@ -27,7 +27,7 @@ This can only be done by the logged in user. ### Example ```objc -SWGUser* body = [[User alloc] init]; // Created user object (optional) +SWGUser* body = [[SWGUser alloc] init]; // Created user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; @@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SWGUser***](User.md)| Created user object | [optional] + **body** | [**SWGUser***](SWGUser.md)| Created user object | [optional] ### Return type @@ -364,7 +364,7 @@ This can only be done by the logged in user. ```objc NSString* username = @"username_example"; // name that need to be deleted -SWGUser* body = [[User alloc] init]; // Updated user object (optional) +SWGUser* body = [[SWGUser alloc] init]; // Updated user object (optional) SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; @@ -383,7 +383,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init]; Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **NSString***| name that need to be deleted | - **body** | [**SWGUser***](User.md)| Updated user object | [optional] + **body** | [**SWGUser***](SWGUser.md)| Updated user object | [optional] ### Return type