Skip to content

Commit

Permalink
fix(swift3): add en_US_POSIX locale to date formatters (#5602)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienfouilhe authored and wing328 committed Jul 4, 2017
1 parent 1187950 commit c2b5756
Show file tree
Hide file tree
Showing 16 changed files with 382 additions and 378 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ open class PetAPI: APIBase {
- OAuth:
- type: oauth2
- name: petstore_auth
- examples: [{contentType=application/xml, example=<Pet>
- examples: [{example=<Pet>
<id>123456789</id>
<name>doggie</name>
<photoUrls>
Expand All @@ -132,21 +132,21 @@ open class PetAPI: APIBase {
<tags>
</tags>
<status>aeiou</status>
</Pet>}, {contentType=application/json, example=[ {
"photoUrls" : [ "aeiou" ],
"name" : "doggie",
</Pet>, 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=<Pet>
"status" : "available",
"name" : "doggie",
"photoUrls" : [ "aeiou" ]
} ], contentType=application/json}]
- examples: [{example=<Pet>
<id>123456789</id>
<name>doggie</name>
<photoUrls>
Expand All @@ -155,20 +155,20 @@ open class PetAPI: APIBase {
<tags>
</tags>
<status>aeiou</status>
</Pet>}, {contentType=application/json, example=[ {
"photoUrls" : [ "aeiou" ],
"name" : "doggie",
</Pet>, 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
Expand Down Expand Up @@ -210,7 +210,7 @@ open class PetAPI: APIBase {
- OAuth:
- type: oauth2
- name: petstore_auth
- examples: [{contentType=application/xml, example=<Pet>
- examples: [{example=<Pet>
<id>123456789</id>
<name>doggie</name>
<photoUrls>
Expand All @@ -219,21 +219,21 @@ open class PetAPI: APIBase {
<tags>
</tags>
<status>aeiou</status>
</Pet>}, {contentType=application/json, example=[ {
"photoUrls" : [ "aeiou" ],
"name" : "doggie",
</Pet>, 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=<Pet>
"status" : "available",
"name" : "doggie",
"photoUrls" : [ "aeiou" ]
} ], contentType=application/json}]
- examples: [{example=<Pet>
<id>123456789</id>
<name>doggie</name>
<photoUrls>
Expand All @@ -242,20 +242,20 @@ open class PetAPI: APIBase {
<tags>
</tags>
<status>aeiou</status>
</Pet>}, {contentType=application/json, example=[ {
"photoUrls" : [ "aeiou" ],
"name" : "doggie",
</Pet>, 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
Expand Down Expand Up @@ -297,7 +297,7 @@ open class PetAPI: APIBase {
- API Key:
- type: apiKey api_key
- name: api_key
- examples: [{contentType=application/xml, example=<Pet>
- examples: [{example=<Pet>
<id>123456789</id>
<name>doggie</name>
<photoUrls>
Expand All @@ -306,21 +306,21 @@ open class PetAPI: APIBase {
<tags>
</tags>
<status>aeiou</status>
</Pet>}, {contentType=application/json, example={
"photoUrls" : [ "aeiou" ],
"name" : "doggie",
</Pet>, 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=<Pet>
"status" : "available",
"name" : "doggie",
"photoUrls" : [ "aeiou" ]
}, contentType=application/json}]
- examples: [{example=<Pet>
<id>123456789</id>
<name>doggie</name>
<photoUrls>
Expand All @@ -329,20 +329,20 @@ open class PetAPI: APIBase {
<tags>
</tags>
<status>aeiou</status>
</Pet>}, {contentType=application/json, example={
"photoUrls" : [ "aeiou" ],
"name" : "doggie",
</Pet>, 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
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]>
*/
Expand Down Expand Up @@ -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=<Order>
- examples: [{example=<Order>
<id>123456789</id>
<petId>123456789</petId>
<quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status>
<complete>true</complete>
</Order>}, {contentType=application/json, example={
"petId" : 6,
"quantity" : 1,
</Order>, 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=<Order>
"status" : "placed",
"quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00"
}, contentType=application/json}]
- examples: [{example=<Order>
<id>123456789</id>
<petId>123456789</petId>
<quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status>
<complete>true</complete>
</Order>}, {contentType=application/json, example={
"petId" : 6,
"quantity" : 1,
</Order>, 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
Expand Down Expand Up @@ -168,36 +168,36 @@ open class StoreAPI: APIBase {
Place an order for a pet
- POST /store/order
-
- examples: [{contentType=application/xml, example=<Order>
- examples: [{example=<Order>
<id>123456789</id>
<petId>123456789</petId>
<quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status>
<complete>true</complete>
</Order>}, {contentType=application/json, example={
"petId" : 6,
"quantity" : 1,
</Order>, 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=<Order>
"status" : "placed",
"quantity" : 1,
"shipDate" : "2000-01-23T04:56:07.000+00:00"
}, contentType=application/json}]
- examples: [{example=<Order>
<id>123456789</id>
<petId>123456789</petId>
<quantity>123</quantity>
<shipDate>2000-01-23T04:56:07.000Z</shipDate>
<status>aeiou</status>
<complete>true</complete>
</Order>}, {contentType=application/json, example={
"petId" : 6,
"quantity" : 1,
</Order>, 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
Expand Down
Loading

0 comments on commit c2b5756

Please sign in to comment.