From c2b575607c2fec5f3e8a644d457dc83848a13cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fouilh=C3=A9?= Date: Tue, 4 Jul 2017 05:21:25 +0200 Subject: [PATCH] fix(swift3): add en_US_POSIX locale to date formatters (#5602) --- .../src/main/resources/swift3/Models.mustache | 1 + .../Classes/Swaggers/APIs/FakeAPI.swift | 4 +- .../Classes/Swaggers/APIs/PetAPI.swift | 152 +++++++++--------- .../Classes/Swaggers/APIs/StoreAPI.swift | 60 +++---- .../Classes/Swaggers/APIs/UserAPI.swift | 36 ++--- .../Classes/Swaggers/Models.swift | 1 + .../Classes/Swaggers/APIs/FakeAPI.swift | 4 +- .../Classes/Swaggers/APIs/PetAPI.swift | 152 +++++++++--------- .../Classes/Swaggers/APIs/StoreAPI.swift | 60 +++---- .../Classes/Swaggers/APIs/UserAPI.swift | 36 ++--- .../Classes/Swaggers/Models.swift | 1 + .../Classes/Swaggers/APIs/FakeAPI.swift | 4 +- .../Classes/Swaggers/APIs/PetAPI.swift | 152 +++++++++--------- .../Classes/Swaggers/APIs/StoreAPI.swift | 60 +++---- .../Classes/Swaggers/APIs/UserAPI.swift | 36 ++--- .../Classes/Swaggers/Models.swift | 1 + 16 files changed, 382 insertions(+), 378 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/swift3/Models.mustache b/modules/swagger-codegen/src/main/resources/swift3/Models.mustache index 43b63fe4186..1e6d3ceab98 100644 --- a/modules/swagger-codegen/src/main/resources/swift3/Models.mustache +++ b/modules/swagger-codegen/src/main/resources/swift3/Models.mustache @@ -144,6 +144,7 @@ class Decoders { "yyyy-MM-dd HH:mm:ss" ].map { (format: String) -> DateFormatter in let formatter = DateFormatter() + formatter.locale = Locale(identifier: "en_US_POSIX") formatter.dateFormat = format return formatter } 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 c061bb819fb..ccfe530cde0 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 @@ -168,9 +168,9 @@ open class FakeAPI: APIBase { To test \"client\" model - PATCH /fake - To test \"client\" model - - examples: [{contentType=application/json, example={ + - examples: [{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 ddb79ca09ee..6f568002ac5 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 @@ -123,7 +123,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -132,21 +132,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -155,20 +155,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] - parameter status: (query) Status values that need to be considered for filter @@ -210,7 +210,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -219,21 +219,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -242,20 +242,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] - parameter tags: (query) Tags to filter by @@ -297,7 +297,7 @@ open class PetAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -306,21 +306,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example={ + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -}}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -329,20 +329,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example={ + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -}}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}] - parameter petId: (path) ID of pet to return @@ -471,11 +471,11 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/json, example={ + - examples: [{example={ + "message" : "aeiou", "code" : 0, - "type" : "aeiou", - "message" : "aeiou" -}}] + "type" : "aeiou" +}, contentType=application/json}] - 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 9ad185d9c0a..9ebae157352 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 @@ -66,9 +66,9 @@ open class StoreAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example={ + - examples: [{example={ "key" : 0 -}}] +}, contentType=application/json}] - returns: RequestBuilder<[String:Int32]> */ @@ -102,36 +102,36 @@ open class StoreAPI: APIBase { Find purchase order by ID - GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] - - examples: [{contentType=application/xml, example= + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] - parameter orderId: (path) ID of pet that needs to be fetched @@ -168,36 +168,36 @@ open class StoreAPI: APIBase { Place an order for a pet - POST /store/order - - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] - - examples: [{contentType=application/xml, example= + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] - 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 5f5d7754609..3b7d33cf4d5 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 @@ -169,7 +169,7 @@ open class UserAPI: APIBase { Get user by user name - GET /user/{username} - - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 aeiou aeiou @@ -178,17 +178,17 @@ open class UserAPI: APIBase { aeiou aeiou 123 -}, {contentType=application/json, example={ - "firstName" : "aeiou", +, contentType=application/xml}, {example={ + "id" : 0, "lastName" : "aeiou", - "password" : "aeiou", - "userStatus" : 6, "phone" : "aeiou", - "id" : 0, + "username" : "aeiou", "email" : "aeiou", - "username" : "aeiou" -}}] - - examples: [{contentType=application/xml, example= + "userStatus" : 6, + "firstName" : "aeiou", + "password" : "aeiou" +}, contentType=application/json}] + - examples: [{example= 123456789 aeiou aeiou @@ -197,16 +197,16 @@ open class UserAPI: APIBase { aeiou aeiou 123 -}, {contentType=application/json, example={ - "firstName" : "aeiou", +, contentType=application/xml}, {example={ + "id" : 0, "lastName" : "aeiou", - "password" : "aeiou", - "userStatus" : 6, "phone" : "aeiou", - "id" : 0, + "username" : "aeiou", "email" : "aeiou", - "username" : "aeiou" -}}] + "userStatus" : 6, + "firstName" : "aeiou", + "password" : "aeiou" +}, contentType=application/json}] - 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: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}] - - examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}] + - examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] + - examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] - 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/default/PetstoreClient/Classes/Swaggers/Models.swift b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/Models.swift index 9368e89f9b8..876d0c2e172 100644 --- a/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/Models.swift +++ b/samples/client/petstore/swift3/default/PetstoreClient/Classes/Swaggers/Models.swift @@ -130,6 +130,7 @@ class Decoders { "yyyy-MM-dd HH:mm:ss" ].map { (format: String) -> DateFormatter in let formatter = DateFormatter() + formatter.locale = Locale(identifier: "en_US_POSIX") formatter.dateFormat = format return formatter } 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 26039262b26..f8efdca4b93 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 @@ -250,9 +250,9 @@ open class FakeAPI: APIBase { To test \"client\" model - PATCH /fake - To test \"client\" model - - examples: [{contentType=application/json, example={ + - examples: [{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 cedd7e12c5a..e57f3ab4f71 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 @@ -176,7 +176,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -185,21 +185,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -208,20 +208,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] - parameter status: (query) Status values that need to be considered for filter @@ -280,7 +280,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -289,21 +289,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -312,20 +312,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] - parameter tags: (query) Tags to filter by @@ -384,7 +384,7 @@ open class PetAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -393,21 +393,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example={ + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -}}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -416,20 +416,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example={ + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -}}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}] - parameter petId: (path) ID of pet to return @@ -613,11 +613,11 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/json, example={ + - examples: [{example={ + "message" : "aeiou", "code" : 0, - "type" : "aeiou", - "message" : "aeiou" -}}] + "type" : "aeiou" +}, contentType=application/json}] - 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 abef290860d..00e8c27a292 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 @@ -100,9 +100,9 @@ open class StoreAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example={ + - examples: [{example={ "key" : 0 -}}] +}, contentType=application/json}] - returns: RequestBuilder<[String:Int32]> */ @@ -153,36 +153,36 @@ open class StoreAPI: APIBase { Find purchase order by ID - GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] - - examples: [{contentType=application/xml, example= + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] - parameter orderId: (path) ID of pet that needs to be fetched @@ -236,36 +236,36 @@ open class StoreAPI: APIBase { Place an order for a pet - POST /store/order - - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] - - examples: [{contentType=application/xml, example= + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] - 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 2e7a5a2da0c..699700af175 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 @@ -255,7 +255,7 @@ open class UserAPI: APIBase { Get user by user name - GET /user/{username} - - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 aeiou aeiou @@ -264,17 +264,17 @@ open class UserAPI: APIBase { aeiou aeiou 123 -}, {contentType=application/json, example={ - "firstName" : "aeiou", +, contentType=application/xml}, {example={ + "id" : 0, "lastName" : "aeiou", - "password" : "aeiou", - "userStatus" : 6, "phone" : "aeiou", - "id" : 0, + "username" : "aeiou", "email" : "aeiou", - "username" : "aeiou" -}}] - - examples: [{contentType=application/xml, example= + "userStatus" : 6, + "firstName" : "aeiou", + "password" : "aeiou" +}, contentType=application/json}] + - examples: [{example= 123456789 aeiou aeiou @@ -283,16 +283,16 @@ open class UserAPI: APIBase { aeiou aeiou 123 -}, {contentType=application/json, example={ - "firstName" : "aeiou", +, contentType=application/xml}, {example={ + "id" : 0, "lastName" : "aeiou", - "password" : "aeiou", - "userStatus" : 6, "phone" : "aeiou", - "id" : 0, + "username" : "aeiou", "email" : "aeiou", - "username" : "aeiou" -}}] + "userStatus" : 6, + "firstName" : "aeiou", + "password" : "aeiou" +}, contentType=application/json}] - 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: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}] - - examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}] + - examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] + - examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] - 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/Models.swift b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/Models.swift index 9368e89f9b8..876d0c2e172 100644 --- a/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/Models.swift +++ b/samples/client/petstore/swift3/promisekit/PetstoreClient/Classes/Swaggers/Models.swift @@ -130,6 +130,7 @@ class Decoders { "yyyy-MM-dd HH:mm:ss" ].map { (format: String) -> DateFormatter in let formatter = DateFormatter() + formatter.locale = Locale(identifier: "en_US_POSIX") formatter.dateFormat = format return formatter } 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 90cd6f01c97..369f4d2c412 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 @@ -260,9 +260,9 @@ open class FakeAPI: APIBase { To test \"client\" model - PATCH /fake - To test \"client\" model - - examples: [{contentType=application/json, example={ + - examples: [{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 3230b262b5c..ad3c9e596fa 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 @@ -182,7 +182,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -191,21 +191,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -214,20 +214,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] - parameter status: (query) Status values that need to be considered for filter @@ -288,7 +288,7 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -297,21 +297,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -320,20 +320,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example=[ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example=[ { + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +} ], contentType=application/json}] - parameter tags: (query) Tags to filter by @@ -394,7 +394,7 @@ open class PetAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 doggie @@ -403,21 +403,21 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example={ + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -}}] - - examples: [{contentType=application/xml, example= + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}] + - examples: [{example= 123456789 doggie @@ -426,20 +426,20 @@ open class PetAPI: APIBase { aeiou -}, {contentType=application/json, example={ - "photoUrls" : [ "aeiou" ], - "name" : "doggie", +, contentType=application/xml}, {example={ + "tags" : [ { + "id" : 1, + "name" : "aeiou" + } ], "id" : 0, "category" : { - "name" : "aeiou", - "id" : 6 + "id" : 6, + "name" : "aeiou" }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -}}] + "status" : "available", + "name" : "doggie", + "photoUrls" : [ "aeiou" ] +}, contentType=application/json}] - parameter petId: (path) ID of pet to return @@ -629,11 +629,11 @@ open class PetAPI: APIBase { - OAuth: - type: oauth2 - name: petstore_auth - - examples: [{contentType=application/json, example={ + - examples: [{example={ + "message" : "aeiou", "code" : 0, - "type" : "aeiou", - "message" : "aeiou" -}}] + "type" : "aeiou" +}, contentType=application/json}] - 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 8624801f51c..691d82b520d 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 @@ -104,9 +104,9 @@ open class StoreAPI: APIBase { - API Key: - type: apiKey api_key - name: api_key - - examples: [{contentType=application/json, example={ + - examples: [{example={ "key" : 0 -}}] +}, contentType=application/json}] - returns: RequestBuilder<[String:Int32]> */ @@ -159,36 +159,36 @@ open class StoreAPI: APIBase { Find purchase order by ID - GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] - - examples: [{contentType=application/xml, example= + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] - parameter orderId: (path) ID of pet that needs to be fetched @@ -244,36 +244,36 @@ open class StoreAPI: APIBase { Place an order for a pet - POST /store/order - - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] - - examples: [{contentType=application/xml, example= + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] + - examples: [{example= 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true -}, {contentType=application/json, example={ - "petId" : 6, - "quantity" : 1, +, contentType=application/xml}, {example={ "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", + "petId" : 6, "complete" : false, - "status" : "placed" -}}] + "status" : "placed", + "quantity" : 1, + "shipDate" : "2000-01-23T04:56:07.000+00:00" +}, contentType=application/json}] - 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 09e55063829..1cff31de121 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 @@ -265,7 +265,7 @@ open class UserAPI: APIBase { Get user by user name - GET /user/{username} - - - examples: [{contentType=application/xml, example= + - examples: [{example= 123456789 aeiou aeiou @@ -274,17 +274,17 @@ open class UserAPI: APIBase { aeiou aeiou 123 -}, {contentType=application/json, example={ - "firstName" : "aeiou", +, contentType=application/xml}, {example={ + "id" : 0, "lastName" : "aeiou", - "password" : "aeiou", - "userStatus" : 6, "phone" : "aeiou", - "id" : 0, + "username" : "aeiou", "email" : "aeiou", - "username" : "aeiou" -}}] - - examples: [{contentType=application/xml, example= + "userStatus" : 6, + "firstName" : "aeiou", + "password" : "aeiou" +}, contentType=application/json}] + - examples: [{example= 123456789 aeiou aeiou @@ -293,16 +293,16 @@ open class UserAPI: APIBase { aeiou aeiou 123 -}, {contentType=application/json, example={ - "firstName" : "aeiou", +, contentType=application/xml}, {example={ + "id" : 0, "lastName" : "aeiou", - "password" : "aeiou", - "userStatus" : 6, "phone" : "aeiou", - "id" : 0, + "username" : "aeiou", "email" : "aeiou", - "username" : "aeiou" -}}] + "userStatus" : 6, + "firstName" : "aeiou", + "password" : "aeiou" +}, contentType=application/json}] - 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: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}] - - examples: [{contentType=application/xml, example=aeiou}, {contentType=application/json, example="aeiou"}] + - examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] + - examples: [{example=aeiou, contentType=application/xml}, {example="aeiou", contentType=application/json}] - 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/Models.swift b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/Models.swift index 9368e89f9b8..876d0c2e172 100644 --- a/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/Models.swift +++ b/samples/client/petstore/swift3/rxswift/PetstoreClient/Classes/Swaggers/Models.swift @@ -130,6 +130,7 @@ class Decoders { "yyyy-MM-dd HH:mm:ss" ].map { (format: String) -> DateFormatter in let formatter = DateFormatter() + formatter.locale = Locale(identifier: "en_US_POSIX") formatter.dateFormat = format return formatter }