Skip to content

Commit c77c2fa

Browse files
committed
Update petstore.yaml with deepObject parameter
1 parent 3ce2885 commit c77c2fa

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

Tests/OpenAPIGeneratorReferenceTests/Resources/Docs/petstore.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ paths:
6969
schema:
7070
format: uuid
7171
type: string
72+
- name: sort
73+
in: query
74+
required: false
75+
style: deepObject
76+
explode: true
77+
schema:
78+
type: object
79+
properties:
80+
id:
81+
type: string
82+
name:
83+
type: string
7284
- $ref: '#/components/parameters/query.born-since'
7385
responses:
7486
'200':

Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Client.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ public struct Client: APIProtocol {
8787
name: "My-Request-UUID",
8888
value: input.headers.myRequestUUID
8989
)
90+
try converter.setQueryItemAsURI(
91+
in: &request,
92+
style: .deepObject,
93+
explode: true,
94+
name: "sort",
95+
value: input.query.sort
96+
)
9097
try converter.setQueryItemAsURI(
9198
in: &request,
9299
style: .form,

Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Server.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ fileprivate extension UniversalServer where APIHandler: APIProtocol {
187187
name: "feeds",
188188
as: Operations.ListPets.Input.Query.FeedsPayload.self
189189
),
190+
sort: try converter.getOptionalQueryItemAsURI(
191+
in: request.soar_query,
192+
style: .deepObject,
193+
explode: true,
194+
name: "sort",
195+
as: Operations.listPets.Input.Query.sortPayload.self
196+
),
190197
since: try converter.getOptionalQueryItemAsURI(
191198
in: request.soar_query,
192199
style: .form,

Tests/OpenAPIGeneratorReferenceTests/Resources/ReferenceSources/Petstore/Types.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,7 @@ public enum Operations {
19051905
/// - limit: How many items to return at one time (max 100)
19061906
/// - habitat:
19071907
/// - feeds:
1908+
/// - sort:
19081909
/// - since: Supply this parameter to filter pets born since the provided date.
19091910
public init(
19101911
limit: Swift.Int32? = nil,
@@ -1915,6 +1916,7 @@ public enum Operations {
19151916
self.limit = limit
19161917
self.habitat = habitat
19171918
self.feeds = feeds
1919+
self.sort = sort
19181920
self.since = since
19191921
}
19201922
}

0 commit comments

Comments
 (0)