Skip to content

Commit 3f2d8df

Browse files
committed
Re-generate OFREP types from current main branch
1 parent decf9ae commit 3f2d8df

File tree

6 files changed

+387
-241
lines changed

6 files changed

+387
-241
lines changed

Sources/OFREP/Generated/Client.swift

+22-22
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ package struct Client: APIProtocol {
4545
///
4646
///
4747
/// - Remark: HTTP `POST /ofrep/v1/evaluate/flags/{key}`.
48-
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/{key}/post`.
49-
package func postOfrepV1EvaluateFlagsKey(_ input: Operations.PostOfrepV1EvaluateFlagsKey.Input) async throws -> Operations.PostOfrepV1EvaluateFlagsKey.Output {
48+
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/{key}/post(evaluateFlag)`.
49+
package func evaluateFlag(_ input: Operations.EvaluateFlag.Input) async throws -> Operations.EvaluateFlag.Output {
5050
try await client.send(
5151
input: input,
52-
forOperation: Operations.PostOfrepV1EvaluateFlagsKey.id,
52+
forOperation: Operations.EvaluateFlag.id,
5353
serializer: { input in
5454
let path = try converter.renderedPath(
5555
template: "/ofrep/v1/evaluate/flags/{}",
@@ -83,7 +83,7 @@ package struct Client: APIProtocol {
8383
switch response.status.code {
8484
case 200:
8585
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
86-
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.Ok.Body
86+
let body: Operations.EvaluateFlag.Output.Ok.Body
8787
let chosenContentType = try converter.bestContentType(
8888
received: contentType,
8989
options: [
@@ -105,7 +105,7 @@ package struct Client: APIProtocol {
105105
return .ok(.init(body: body))
106106
case 400:
107107
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
108-
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.BadRequest.Body
108+
let body: Operations.EvaluateFlag.Output.BadRequest.Body
109109
let chosenContentType = try converter.bestContentType(
110110
received: contentType,
111111
options: [
@@ -127,7 +127,7 @@ package struct Client: APIProtocol {
127127
return .badRequest(.init(body: body))
128128
case 404:
129129
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
130-
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.NotFound.Body
130+
let body: Operations.EvaluateFlag.Output.NotFound.Body
131131
let chosenContentType = try converter.bestContentType(
132132
received: contentType,
133133
options: [
@@ -152,15 +152,15 @@ package struct Client: APIProtocol {
152152
case 403:
153153
return .forbidden(.init())
154154
case 429:
155-
let headers: Operations.PostOfrepV1EvaluateFlagsKey.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
155+
let headers: Operations.EvaluateFlag.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
156156
in: response.headerFields,
157157
name: "Retry-After",
158158
as: Foundation.Date.self
159159
))
160160
return .tooManyRequests(.init(headers: headers))
161161
case 500:
162162
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
163-
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.InternalServerError.Body
163+
let body: Operations.EvaluateFlag.Output.InternalServerError.Body
164164
let chosenContentType = try converter.bestContentType(
165165
received: contentType,
166166
options: [
@@ -199,11 +199,11 @@ package struct Client: APIProtocol {
199199
///
200200
///
201201
/// - Remark: HTTP `POST /ofrep/v1/evaluate/flags`.
202-
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/post`.
203-
package func postOfrepV1EvaluateFlags(_ input: Operations.PostOfrepV1EvaluateFlags.Input) async throws -> Operations.PostOfrepV1EvaluateFlags.Output {
202+
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/post(evaluateFlagsBulk)`.
203+
package func evaluateFlagsBulk(_ input: Operations.EvaluateFlagsBulk.Input) async throws -> Operations.EvaluateFlagsBulk.Output {
204204
try await client.send(
205205
input: input,
206-
forOperation: Operations.PostOfrepV1EvaluateFlags.id,
206+
forOperation: Operations.EvaluateFlagsBulk.id,
207207
serializer: { input in
208208
let path = try converter.renderedPath(
209209
template: "/ofrep/v1/evaluate/flags",
@@ -239,13 +239,13 @@ package struct Client: APIProtocol {
239239
deserializer: { response, responseBody in
240240
switch response.status.code {
241241
case 200:
242-
let headers: Operations.PostOfrepV1EvaluateFlags.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
242+
let headers: Operations.EvaluateFlagsBulk.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
243243
in: response.headerFields,
244244
name: "ETag",
245245
as: Swift.String.self
246246
))
247247
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
248-
let body: Operations.PostOfrepV1EvaluateFlags.Output.Ok.Body
248+
let body: Operations.EvaluateFlagsBulk.Output.Ok.Body
249249
let chosenContentType = try converter.bestContentType(
250250
received: contentType,
251251
options: [
@@ -272,7 +272,7 @@ package struct Client: APIProtocol {
272272
return .notModified(.init())
273273
case 400:
274274
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
275-
let body: Operations.PostOfrepV1EvaluateFlags.Output.BadRequest.Body
275+
let body: Operations.EvaluateFlagsBulk.Output.BadRequest.Body
276276
let chosenContentType = try converter.bestContentType(
277277
received: contentType,
278278
options: [
@@ -297,15 +297,15 @@ package struct Client: APIProtocol {
297297
case 403:
298298
return .forbidden(.init())
299299
case 429:
300-
let headers: Operations.PostOfrepV1EvaluateFlags.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
300+
let headers: Operations.EvaluateFlagsBulk.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
301301
in: response.headerFields,
302302
name: "Retry-After",
303303
as: Foundation.Date.self
304304
))
305305
return .tooManyRequests(.init(headers: headers))
306306
case 500:
307307
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
308-
let body: Operations.PostOfrepV1EvaluateFlags.Output.InternalServerError.Body
308+
let body: Operations.EvaluateFlagsBulk.Output.InternalServerError.Body
309309
let chosenContentType = try converter.bestContentType(
310310
received: contentType,
311311
options: [
@@ -344,11 +344,11 @@ package struct Client: APIProtocol {
344344
///
345345
///
346346
/// - Remark: HTTP `GET /ofrep/v1/configuration`.
347-
/// - Remark: Generated from `#/paths//ofrep/v1/configuration/get`.
348-
package func getOfrepV1Configuration(_ input: Operations.GetOfrepV1Configuration.Input) async throws -> Operations.GetOfrepV1Configuration.Output {
347+
/// - Remark: Generated from `#/paths//ofrep/v1/configuration/get(getConfiguration)`.
348+
package func getConfiguration(_ input: Operations.GetConfiguration.Input) async throws -> Operations.GetConfiguration.Output {
349349
try await client.send(
350350
input: input,
351-
forOperation: Operations.GetOfrepV1Configuration.id,
351+
forOperation: Operations.GetConfiguration.id,
352352
serializer: { input in
353353
let path = try converter.renderedPath(
354354
template: "/ofrep/v1/configuration",
@@ -373,13 +373,13 @@ package struct Client: APIProtocol {
373373
deserializer: { response, responseBody in
374374
switch response.status.code {
375375
case 200:
376-
let headers: Operations.GetOfrepV1Configuration.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
376+
let headers: Operations.GetConfiguration.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
377377
in: response.headerFields,
378378
name: "ETag",
379379
as: Swift.String.self
380380
))
381381
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
382-
let body: Operations.GetOfrepV1Configuration.Output.Ok.Body
382+
let body: Operations.GetConfiguration.Output.Ok.Body
383383
let chosenContentType = try converter.bestContentType(
384384
received: contentType,
385385
options: [
@@ -410,7 +410,7 @@ package struct Client: APIProtocol {
410410
return .forbidden(.init())
411411
case 500:
412412
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
413-
let body: Operations.GetOfrepV1Configuration.Output.InternalServerError.Body
413+
let body: Operations.GetConfiguration.Output.InternalServerError.Body
414414
let chosenContentType = try converter.bestContentType(
415415
received: contentType,
416416
options: [

0 commit comments

Comments
 (0)