Skip to content

Commit

Permalink
Serialize evaluation context to OFREP
Browse files Browse the repository at this point in the history
  • Loading branch information
slashmo committed Jan 26, 2025
1 parent 0d686b2 commit c78668a
Show file tree
Hide file tree
Showing 5 changed files with 498 additions and 310 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $(GEN_SWIFTS): $(OPENAPI_SPEC) $(OPENAPI_GEN_SWIFT)
--mode types \
--mode client \
--naming-strategy idiomatic \
--access-modifier package \
--output-directory $(GEN_SWIFT_ROOT)

.PHONY: generate
Expand Down
10 changes: 5 additions & 5 deletions Sources/OFREP/Generated/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import struct Foundation.Date
#endif
import HTTPTypes
/// OFREP define the protocol for remote flag evaluations
internal struct Client: APIProtocol {
package struct Client: APIProtocol {
/// The underlying HTTP client.
private let client: UniversalClient
/// Creates a new client.
Expand All @@ -22,7 +22,7 @@ internal struct Client: APIProtocol {
/// - configuration: A set of configuration values for the client.
/// - transport: A transport that performs HTTP operations.
/// - middlewares: A list of middlewares to call before the transport.
internal init(
package init(
serverURL: Foundation.URL,
configuration: Configuration = .init(),
transport: any ClientTransport,
Expand All @@ -46,7 +46,7 @@ internal struct Client: APIProtocol {
///
/// - Remark: HTTP `POST /ofrep/v1/evaluate/flags/{key}`.
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/{key}/post`.
internal func postOfrepV1EvaluateFlagsKey(_ input: Operations.PostOfrepV1EvaluateFlagsKey.Input) async throws -> Operations.PostOfrepV1EvaluateFlagsKey.Output {
package func postOfrepV1EvaluateFlagsKey(_ input: Operations.PostOfrepV1EvaluateFlagsKey.Input) async throws -> Operations.PostOfrepV1EvaluateFlagsKey.Output {
try await client.send(
input: input,
forOperation: Operations.PostOfrepV1EvaluateFlagsKey.id,
Expand Down Expand Up @@ -200,7 +200,7 @@ internal struct Client: APIProtocol {
///
/// - Remark: HTTP `POST /ofrep/v1/evaluate/flags`.
/// - Remark: Generated from `#/paths//ofrep/v1/evaluate/flags/post`.
internal func postOfrepV1EvaluateFlags(_ input: Operations.PostOfrepV1EvaluateFlags.Input) async throws -> Operations.PostOfrepV1EvaluateFlags.Output {
package func postOfrepV1EvaluateFlags(_ input: Operations.PostOfrepV1EvaluateFlags.Input) async throws -> Operations.PostOfrepV1EvaluateFlags.Output {
try await client.send(
input: input,
forOperation: Operations.PostOfrepV1EvaluateFlags.id,
Expand Down Expand Up @@ -345,7 +345,7 @@ internal struct Client: APIProtocol {
///
/// - Remark: HTTP `GET /ofrep/v1/configuration`.
/// - Remark: Generated from `#/paths//ofrep/v1/configuration/get`.
internal func getOfrepV1Configuration(_ input: Operations.GetOfrepV1Configuration.Input) async throws -> Operations.GetOfrepV1Configuration.Output {
package func getOfrepV1Configuration(_ input: Operations.GetOfrepV1Configuration.Input) async throws -> Operations.GetOfrepV1Configuration.Output {
try await client.send(
input: input,
forOperation: Operations.GetOfrepV1Configuration.id,
Expand Down
Loading

0 comments on commit c78668a

Please sign in to comment.