diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift3Codegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift3Codegen.java index d08dd89c585a..7bfdbf10e079 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift3Codegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift3Codegen.java @@ -506,6 +506,11 @@ public class Swift3Codegen extends DefaultCodegen implements CodegenConfig { return camelize(WordUtils.capitalizeFully(getSymbolName(name).toUpperCase()), true); } + // Reserved Name + if (isReservedWord(name)) { + return escapeReservedWord(name); + } + if ("Int".equals(datatype) || "Int32".equals(datatype) || "Int64".equals(datatype) || "Float".equals(datatype) || "Double".equals(datatype)) { String varName = "number" + camelize(name); diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift index 8a3f0796cdf1..7ff3c6e42027 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift @@ -26,9 +26,9 @@ open class FakeAPI: APIBase { /** To test \"client\" model - PATCH /fake - - examples: [{example={ + - examples: [{contentType=application/json, example={ "client" : "aeiou" -}, contentType=application/json}] +}}] - parameter body: (body) client model diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index 06e868f881ee..0588a85ade12 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -117,7 +117,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -126,21 +126,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -149,20 +149,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] - parameter status: (query) Status values that need to be considered for filter @@ -205,7 +205,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -214,21 +214,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -237,20 +237,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] - parameter tags: (query) Tags to filter by @@ -293,7 +293,7 @@ open class PetAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -302,21 +302,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example={ - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example={ + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -}, contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -325,20 +325,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example={ - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example={ + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -}, contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +}}] - parameter petId: (path) ID of pet to return @@ -467,11 +467,11 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example={ - "message" : "aeiou", + - examples: [{contentType=application/json, example={ "code" : 123, - "type" : "aeiou" -}, contentType=application/json}] + "type" : "aeiou", + "message" : "aeiou" +}}] - parameter petId: (path) ID of pet to update - parameter additionalMetadata: (form) Additional data to pass to server (optional) diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index d5b2aede9c04..8c30504c5c9d 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -67,9 +67,9 @@ open class StoreAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{example={ + - examples: [{contentType=application/json, example={ "key" : 123 -}, contentType=application/json}] +}}] - returns: RequestBuilder<[String:Int32]> */ @@ -105,36 +105,36 @@ open class StoreAPI: APIBase { Find purchase order by ID - GET /store/order/{orderId} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] - - examples: [{example= + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] - parameter orderId: (path) ID of pet that needs to be fetched @@ -173,36 +173,36 @@ open class StoreAPI: APIBase { Place an order for a pet - POST /store/order - - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] - - examples: [{example= + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] - parameter body: (body) order placed for purchasing the pet diff --git a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index 9aec457645ab..84ba24276e2b 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -167,7 +167,7 @@ open class UserAPI: APIBase { Get user by user name - GET /user/{username} - - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 string string @@ -176,17 +176,17 @@ open class UserAPI: APIBase { string string 0 -, contentType=application/xml}, {example={ - "id" : 123456789, - "lastName" : "aeiou", - "phone" : "aeiou", - "username" : "aeiou", - "email" : "aeiou", - "userStatus" : 123, +}, {contentType=application/json, example={ "firstName" : "aeiou", - "password" : "aeiou" -}, contentType=application/json}] - - examples: [{example= + "lastName" : "aeiou", + "password" : "aeiou", + "userStatus" : 123, + "phone" : "aeiou", + "id" : 123456789, + "email" : "aeiou", + "username" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 string string @@ -195,16 +195,16 @@ open class UserAPI: APIBase { string string 0 -, contentType=application/xml}, {example={ - "id" : 123456789, - "lastName" : "aeiou", - "phone" : "aeiou", - "username" : "aeiou", - "email" : "aeiou", - "userStatus" : 123, +}, {contentType=application/json, example={ "firstName" : "aeiou", - "password" : "aeiou" -}, contentType=application/json}] + "lastName" : "aeiou", + "password" : "aeiou", + "userStatus" : 123, + "phone" : "aeiou", + "id" : 123456789, + "email" : "aeiou", + "username" : "aeiou" +}}] - parameter username: (path) The name that needs to be fetched. Use user1 for testing. @@ -246,8 +246,8 @@ open class UserAPI: APIBase { - - responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)] - responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)] - - examples: [{example=string, contentType=application/xml}, {example="aeiou", contentType=application/json}] - - examples: [{example=string, contentType=application/xml}, {example="aeiou", contentType=application/json}] + - examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}] + - examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}] - parameter username: (query) The user name for login - parameter password: (query) The password for login in clear text diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift index dff3efee6a76..407320d315cc 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift @@ -44,9 +44,9 @@ open class FakeAPI: APIBase { /** To test \"client\" model - PATCH /fake - - examples: [{example={ + - examples: [{contentType=application/json, example={ "client" : "aeiou" -}, contentType=application/json}] +}}] - parameter body: (body) client model diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index 287d11d4e6d5..48a7379ca26f 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -169,7 +169,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -178,21 +178,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -201,20 +201,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] - parameter status: (query) Status values that need to be considered for filter @@ -274,7 +274,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -283,21 +283,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -306,20 +306,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] - parameter tags: (query) Tags to filter by @@ -379,7 +379,7 @@ open class PetAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -388,21 +388,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example={ - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example={ + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -}, contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -411,20 +411,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example={ - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example={ + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -}, contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +}}] - parameter petId: (path) ID of pet to return @@ -608,11 +608,11 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example={ - "message" : "aeiou", + - examples: [{contentType=application/json, example={ "code" : 123, - "type" : "aeiou" -}, contentType=application/json}] + "type" : "aeiou", + "message" : "aeiou" +}}] - parameter petId: (path) ID of pet to update - parameter additionalMetadata: (form) Additional data to pass to server (optional) diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 11a630558773..dac3b79dcbe6 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -101,9 +101,9 @@ open class StoreAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{example={ + - examples: [{contentType=application/json, example={ "key" : 123 -}, contentType=application/json}] +}}] - returns: RequestBuilder<[String:Int32]> */ @@ -156,36 +156,36 @@ open class StoreAPI: APIBase { Find purchase order by ID - GET /store/order/{orderId} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] - - examples: [{example= + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] - parameter orderId: (path) ID of pet that needs to be fetched @@ -241,36 +241,36 @@ open class StoreAPI: APIBase { Place an order for a pet - POST /store/order - - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] - - examples: [{example= + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] - parameter body: (body) order placed for purchasing the pet diff --git a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index bd000b1297e7..84557cffcb2c 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -253,7 +253,7 @@ open class UserAPI: APIBase { Get user by user name - GET /user/{username} - - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 string string @@ -262,17 +262,17 @@ open class UserAPI: APIBase { string string 0 -, contentType=application/xml}, {example={ - "id" : 123456789, - "lastName" : "aeiou", - "phone" : "aeiou", - "username" : "aeiou", - "email" : "aeiou", - "userStatus" : 123, +}, {contentType=application/json, example={ "firstName" : "aeiou", - "password" : "aeiou" -}, contentType=application/json}] - - examples: [{example= + "lastName" : "aeiou", + "password" : "aeiou", + "userStatus" : 123, + "phone" : "aeiou", + "id" : 123456789, + "email" : "aeiou", + "username" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 string string @@ -281,16 +281,16 @@ open class UserAPI: APIBase { string string 0 -, contentType=application/xml}, {example={ - "id" : 123456789, - "lastName" : "aeiou", - "phone" : "aeiou", - "username" : "aeiou", - "email" : "aeiou", - "userStatus" : 123, +}, {contentType=application/json, example={ "firstName" : "aeiou", - "password" : "aeiou" -}, contentType=application/json}] + "lastName" : "aeiou", + "password" : "aeiou", + "userStatus" : 123, + "phone" : "aeiou", + "id" : 123456789, + "email" : "aeiou", + "username" : "aeiou" +}}] - parameter username: (path) The name that needs to be fetched. Use user1 for testing. @@ -350,8 +350,8 @@ open class UserAPI: APIBase { - - responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)] - responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)] - - examples: [{example=string, contentType=application/xml}, {example="aeiou", contentType=application/json}] - - examples: [{example=string, contentType=application/xml}, {example="aeiou", contentType=application/json}] + - examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}] + - examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}] - parameter username: (query) The user name for login - parameter password: (query) The password for login in clear text diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift index 1edf39d3062b..69dab9ff57b1 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/FakeAPI.swift @@ -46,9 +46,9 @@ open class FakeAPI: APIBase { /** To test \"client\" model - PATCH /fake - - examples: [{example={ + - examples: [{contentType=application/json, example={ "client" : "aeiou" -}, contentType=application/json}] +}}] - parameter body: (body) client model diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift index 845a950ce6d3..e5c3f5e33258 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/PetAPI.swift @@ -175,7 +175,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -184,21 +184,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -207,20 +207,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] - parameter status: (query) Status values that need to be considered for filter @@ -282,7 +282,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -291,21 +291,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -314,20 +314,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example=[ { - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example=[ { + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -} ], contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +} ]}] - parameter tags: (query) Tags to filter by @@ -389,7 +389,7 @@ open class PetAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 doggie @@ -398,21 +398,21 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example={ - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example={ + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -}, contentType=application/json}] - - examples: [{example= + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 doggie @@ -421,20 +421,20 @@ open class PetAPI: APIBase { string -, contentType=application/xml}, {example={ - "tags" : [ { - "id" : 123456789, - "name" : "aeiou" - } ], +}, {contentType=application/json, example={ + "photoUrls" : [ "aeiou" ], + "name" : "doggie", "id" : 123456789, "category" : { - "id" : 123456789, - "name" : "aeiou" + "name" : "aeiou", + "id" : 123456789 }, - "status" : "aeiou", - "name" : "doggie", - "photoUrls" : [ "aeiou" ] -}, contentType=application/json}] + "tags" : [ { + "name" : "aeiou", + "id" : 123456789 + } ], + "status" : "aeiou" +}}] - parameter petId: (path) ID of pet to return @@ -624,11 +624,11 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{example={ - "message" : "aeiou", + - examples: [{contentType=application/json, example={ "code" : 123, - "type" : "aeiou" -}, contentType=application/json}] + "type" : "aeiou", + "message" : "aeiou" +}}] - parameter petId: (path) ID of pet to update - parameter additionalMetadata: (form) Additional data to pass to server (optional) diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift index 791070dea5e7..4b27503475b9 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/StoreAPI.swift @@ -105,9 +105,9 @@ open class StoreAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{example={ + - examples: [{contentType=application/json, example={ "key" : 123 -}, contentType=application/json}] +}}] - returns: RequestBuilder<[String:Int32]> */ @@ -162,36 +162,36 @@ open class StoreAPI: APIBase { Find purchase order by ID - GET /store/order/{orderId} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] - - examples: [{example= + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] - parameter orderId: (path) ID of pet that needs to be fetched @@ -249,36 +249,36 @@ open class StoreAPI: APIBase { Place an order for a pet - POST /store/order - - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] - - examples: [{example= + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 123456 0 2000-01-23T04:56:07.000Z string true -, contentType=application/xml}, {example={ - "id" : 123456789, +}, {contentType=application/json, example={ "petId" : 123456789, - "complete" : true, - "status" : "aeiou", "quantity" : 123, - "shipDate" : "2000-01-23T04:56:07.000+00:00" -}, contentType=application/json}] + "id" : 123456789, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : true, + "status" : "aeiou" +}}] - parameter body: (body) order placed for purchasing the pet diff --git a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift index c0cab1585254..a6530489f396 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/APIs/UserAPI.swift @@ -263,7 +263,7 @@ open class UserAPI: APIBase { Get user by user name - GET /user/{username} - - - examples: [{example= + - examples: [{contentType=application/xml, example= 123456 string string @@ -272,17 +272,17 @@ open class UserAPI: APIBase { string string 0 -, contentType=application/xml}, {example={ - "id" : 123456789, - "lastName" : "aeiou", - "phone" : "aeiou", - "username" : "aeiou", - "email" : "aeiou", - "userStatus" : 123, +}, {contentType=application/json, example={ "firstName" : "aeiou", - "password" : "aeiou" -}, contentType=application/json}] - - examples: [{example= + "lastName" : "aeiou", + "password" : "aeiou", + "userStatus" : 123, + "phone" : "aeiou", + "id" : 123456789, + "email" : "aeiou", + "username" : "aeiou" +}}] + - examples: [{contentType=application/xml, example= 123456 string string @@ -291,16 +291,16 @@ open class UserAPI: APIBase { string string 0 -, contentType=application/xml}, {example={ - "id" : 123456789, - "lastName" : "aeiou", - "phone" : "aeiou", - "username" : "aeiou", - "email" : "aeiou", - "userStatus" : 123, +}, {contentType=application/json, example={ "firstName" : "aeiou", - "password" : "aeiou" -}, contentType=application/json}] + "lastName" : "aeiou", + "password" : "aeiou", + "userStatus" : 123, + "phone" : "aeiou", + "id" : 123456789, + "email" : "aeiou", + "username" : "aeiou" +}}] - parameter username: (path) The name that needs to be fetched. Use user1 for testing. @@ -362,8 +362,8 @@ open class UserAPI: APIBase { - - responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)] - responseHeaders: [X-Rate-Limit(Int32), X-Expires-After(Date)] - - examples: [{example=string, contentType=application/xml}, {example="aeiou", contentType=application/json}] - - examples: [{example=string, contentType=application/xml}, {example="aeiou", contentType=application/json}] + - examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}] + - examples: [{contentType=application/xml, example=string}, {contentType=application/json, example="aeiou"}] - parameter username: (query) The user name for login - parameter password: (query) The password for login in clear text