diff --git a/Sources/AviaryInsights/Generated/Client.swift b/Sources/AviaryInsights/Generated/Client.swift index ff009e8..b74b036 100644 --- a/Sources/AviaryInsights/Generated/Client.swift +++ b/Sources/AviaryInsights/Generated/Client.swift @@ -56,10 +56,6 @@ internal struct Client: APIProtocol { method: .post ) suppressMutabilityWarning(&request) - converter.setAcceptHeader( - in: &request.headerFields, - contentTypes: input.headers.accept - ) let body: OpenAPIRuntime.HTTPBody? switch input.body { case let .json(value): @@ -74,27 +70,7 @@ internal struct Client: APIProtocol { deserializer: { response, responseBody in switch response.status.code { case 202: - let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) - let body: Operations.post_sol_event.Output.Accepted.Body - let chosenContentType = try converter.bestContentType( - received: contentType, - options: [ - "application/json" - ] - ) - switch chosenContentType { - case "application/json": - body = try await converter.getResponseBodyAsJSON( - OpenAPIRuntime.OpenAPIObjectContainer.self, - from: responseBody, - transforming: { value in - .json(value) - } - ) - default: - preconditionFailure("bestContentType chose an invalid content type.") - } - return .accepted(.init(body: body)) + return .accepted(.init()) default: return .undocumented( statusCode: response.status.code, diff --git a/Sources/AviaryInsights/Generated/Types.swift b/Sources/AviaryInsights/Generated/Types.swift index 1d15ae4..74ea84a 100644 --- a/Sources/AviaryInsights/Generated/Types.swift +++ b/Sources/AviaryInsights/Generated/Types.swift @@ -24,14 +24,8 @@ extension APIProtocol { /// /// - Remark: HTTP `POST /event`. /// - Remark: Generated from `#/paths//event/post`. - internal func post_sol_event( - headers: Operations.post_sol_event.Input.Headers = .init(), - body: Operations.post_sol_event.Input.Body - ) async throws -> Operations.post_sol_event.Output { - try await post_sol_event(Operations.post_sol_event.Input( - headers: headers, - body: body - )) + internal func post_sol_event(body: Operations.post_sol_event.Input.Body) async throws -> Operations.post_sol_event.Output { + try await post_sol_event(Operations.post_sol_event.Input(body: body)) } } @@ -69,18 +63,6 @@ internal enum Operations { internal enum post_sol_event { internal static let id: Swift.String = "post/event" internal struct Input: Sendable, Hashable { - /// - Remark: Generated from `#/paths/event/POST/header`. - internal struct Headers: Sendable, Hashable { - internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] - /// Creates a new `Headers`. - /// - /// - Parameters: - /// - accept: - internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { - self.accept = accept - } - } - internal var headers: Operations.post_sol_event.Input.Headers /// - Remark: Generated from `#/paths/event/POST/requestBody`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/event/POST/requestBody/json`. @@ -178,44 +160,15 @@ internal enum Operations { /// Creates a new `Input`. /// /// - Parameters: - /// - headers: /// - body: - internal init( - headers: Operations.post_sol_event.Input.Headers = .init(), - body: Operations.post_sol_event.Input.Body - ) { - self.headers = headers + internal init(body: Operations.post_sol_event.Input.Body) { self.body = body } } @frozen internal enum Output: Sendable, Hashable { internal struct Accepted: Sendable, Hashable { - /// - Remark: Generated from `#/paths/event/POST/responses/202/content`. - @frozen internal enum Body: Sendable, Hashable { - /// - Remark: Generated from `#/paths/event/POST/responses/202/content/application\/json`. - case json(OpenAPIRuntime.OpenAPIObjectContainer) - /// The associated value of the enum case if `self` is `.json`. - /// - /// - Throws: An error if `self` is not `.json`. - /// - SeeAlso: `.json`. - internal var json: OpenAPIRuntime.OpenAPIObjectContainer { - get throws { - switch self { - case let .json(body): - return body - } - } - } - } - /// Received HTTP response body - internal var body: Operations.post_sol_event.Output.Accepted.Body /// Creates a new `Accepted`. - /// - /// - Parameters: - /// - body: Received HTTP response body - internal init(body: Operations.post_sol_event.Output.Accepted.Body) { - self.body = body - } + internal init() {} } /// Accepted /// @@ -245,30 +198,5 @@ internal enum Operations { /// A response with a code that is not documented in the OpenAPI document. case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } - @frozen internal enum AcceptableContentType: AcceptableProtocol { - case json - case other(Swift.String) - internal init?(rawValue: Swift.String) { - switch rawValue.lowercased() { - case "application/json": - self = .json - default: - self = .other(rawValue) - } - } - internal var rawValue: Swift.String { - switch self { - case let .other(string): - return string - case .json: - return "application/json" - } - } - internal static var allCases: [Self] { - [ - .json - ] - } - } } } diff --git a/openapi.yaml b/openapi.yaml index 9aca951..617dc34 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -60,8 +60,3 @@ paths: responses: '202': description: Accepted - content: - application/json: - schema: - type: object - example: {}