Skip to content

Re-generate OFREP types from current main branch #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions Sources/OFREP/Generated/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ package struct Client: APIProtocol {
///
///
/// - Remark: HTTP `POST /ofrep/v1/evaluate/flags/{key}`.
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/{key}/post`.
package func postOfrepV1EvaluateFlagsKey(_ input: Operations.PostOfrepV1EvaluateFlagsKey.Input) async throws -> Operations.PostOfrepV1EvaluateFlagsKey.Output {
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/{key}/post(evaluateFlag)`.
package func evaluateFlag(_ input: Operations.EvaluateFlag.Input) async throws -> Operations.EvaluateFlag.Output {
try await client.send(
input: input,
forOperation: Operations.PostOfrepV1EvaluateFlagsKey.id,
forOperation: Operations.EvaluateFlag.id,
serializer: { input in
let path = try converter.renderedPath(
template: "/ofrep/v1/evaluate/flags/{}",
Expand Down Expand Up @@ -83,7 +83,7 @@ package struct Client: APIProtocol {
switch response.status.code {
case 200:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.Ok.Body
let body: Operations.EvaluateFlag.Output.Ok.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand All @@ -105,7 +105,7 @@ package struct Client: APIProtocol {
return .ok(.init(body: body))
case 400:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.BadRequest.Body
let body: Operations.EvaluateFlag.Output.BadRequest.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand All @@ -127,7 +127,7 @@ package struct Client: APIProtocol {
return .badRequest(.init(body: body))
case 404:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.NotFound.Body
let body: Operations.EvaluateFlag.Output.NotFound.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand All @@ -152,15 +152,15 @@ package struct Client: APIProtocol {
case 403:
return .forbidden(.init())
case 429:
let headers: Operations.PostOfrepV1EvaluateFlagsKey.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
let headers: Operations.EvaluateFlag.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
in: response.headerFields,
name: "Retry-After",
as: Foundation.Date.self
))
return .tooManyRequests(.init(headers: headers))
case 500:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.PostOfrepV1EvaluateFlagsKey.Output.InternalServerError.Body
let body: Operations.EvaluateFlag.Output.InternalServerError.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand Down Expand Up @@ -199,11 +199,11 @@ package struct Client: APIProtocol {
///
///
/// - Remark: HTTP `POST /ofrep/v1/evaluate/flags`.
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/post`.
package func postOfrepV1EvaluateFlags(_ input: Operations.PostOfrepV1EvaluateFlags.Input) async throws -> Operations.PostOfrepV1EvaluateFlags.Output {
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/post(evaluateFlagsBulk)`.
package func evaluateFlagsBulk(_ input: Operations.EvaluateFlagsBulk.Input) async throws -> Operations.EvaluateFlagsBulk.Output {
try await client.send(
input: input,
forOperation: Operations.PostOfrepV1EvaluateFlags.id,
forOperation: Operations.EvaluateFlagsBulk.id,
serializer: { input in
let path = try converter.renderedPath(
template: "/ofrep/v1/evaluate/flags",
Expand Down Expand Up @@ -239,13 +239,13 @@ package struct Client: APIProtocol {
deserializer: { response, responseBody in
switch response.status.code {
case 200:
let headers: Operations.PostOfrepV1EvaluateFlags.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
let headers: Operations.EvaluateFlagsBulk.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
in: response.headerFields,
name: "ETag",
as: Swift.String.self
))
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.PostOfrepV1EvaluateFlags.Output.Ok.Body
let body: Operations.EvaluateFlagsBulk.Output.Ok.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand All @@ -272,7 +272,7 @@ package struct Client: APIProtocol {
return .notModified(.init())
case 400:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.PostOfrepV1EvaluateFlags.Output.BadRequest.Body
let body: Operations.EvaluateFlagsBulk.Output.BadRequest.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand All @@ -297,15 +297,15 @@ package struct Client: APIProtocol {
case 403:
return .forbidden(.init())
case 429:
let headers: Operations.PostOfrepV1EvaluateFlags.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
let headers: Operations.EvaluateFlagsBulk.Output.TooManyRequests.Headers = .init(retryAfter: try converter.getOptionalHeaderFieldAsURI(
in: response.headerFields,
name: "Retry-After",
as: Foundation.Date.self
))
return .tooManyRequests(.init(headers: headers))
case 500:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.PostOfrepV1EvaluateFlags.Output.InternalServerError.Body
let body: Operations.EvaluateFlagsBulk.Output.InternalServerError.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand Down Expand Up @@ -344,11 +344,11 @@ package struct Client: APIProtocol {
///
///
/// - Remark: HTTP `GET /ofrep/v1/configuration`.
/// - Remark: Generated from `#/paths//ofrep/v1/configuration/get`.
package func getOfrepV1Configuration(_ input: Operations.GetOfrepV1Configuration.Input) async throws -> Operations.GetOfrepV1Configuration.Output {
/// - Remark: Generated from `#/paths//ofrep/v1/configuration/get(getConfiguration)`.
package func getConfiguration(_ input: Operations.GetConfiguration.Input) async throws -> Operations.GetConfiguration.Output {
try await client.send(
input: input,
forOperation: Operations.GetOfrepV1Configuration.id,
forOperation: Operations.GetConfiguration.id,
serializer: { input in
let path = try converter.renderedPath(
template: "/ofrep/v1/configuration",
Expand All @@ -373,13 +373,13 @@ package struct Client: APIProtocol {
deserializer: { response, responseBody in
switch response.status.code {
case 200:
let headers: Operations.GetOfrepV1Configuration.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
let headers: Operations.GetConfiguration.Output.Ok.Headers = .init(eTag: try converter.getOptionalHeaderFieldAsURI(
in: response.headerFields,
name: "ETag",
as: Swift.String.self
))
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.GetOfrepV1Configuration.Output.Ok.Body
let body: Operations.GetConfiguration.Output.Ok.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand Down Expand Up @@ -410,7 +410,7 @@ package struct Client: APIProtocol {
return .forbidden(.init())
case 500:
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
let body: Operations.GetOfrepV1Configuration.Output.InternalServerError.Body
let body: Operations.GetConfiguration.Output.InternalServerError.Body
let chosenContentType = try converter.bestContentType(
received: contentType,
options: [
Expand Down
Loading