Skip to content

Commit 7dd5f23

Browse files
committed
remove OpenAPILambdaHandler from the public API
1 parent 1d81a0e commit 7dd5f23

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Sources/OpenAPILambda.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,12 @@ public protocol OpenAPILambda: Sendable {
4343
extension OpenAPILambda {
4444
/// Returns the Lambda handler function for this OpenAPI Lambda implementation.
4545
/// - Returns: A handler function that can be used with AWS Lambda Runtime
46-
@inlinable
4746
public static func handler() throws -> @Sendable (Event, LambdaContext) async throws -> Output {
4847
try OpenAPILambdaHandler<Self>().handler
4948
}
5049

5150
/// Run the Lambda handler function for this OpenAPI Lambda implementation with a custom logger, when one is given.
5251
/// - Parameter logger: The logger to use for Lambda runtime logging
53-
@inlinable
5452
public static func run(logger: Logger? = nil) async throws {
5553
let lambdaRuntime:
5654
LambdaRuntime<

Sources/OpenAPILambdaHandler.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import OpenAPIRuntime
1818
import HTTPTypes
1919

2020
/// Specialization of LambdaHandler which runs an OpenAPILambda
21-
public struct OpenAPILambdaHandler<L: OpenAPILambda>: Sendable {
21+
struct OpenAPILambdaHandler<L: OpenAPILambda>: Sendable {
2222

2323
private let router: OpenAPILambdaRouter
2424
private let transport: OpenAPILambdaTransport
@@ -35,7 +35,7 @@ public struct OpenAPILambdaHandler<L: OpenAPILambda>: Sendable {
3535
/// Create application, set it up and create `OpenAPILambda` from application and create responder
3636
/// - Parameters
3737
/// - context: Lambda initialization context
38-
public init() throws {
38+
init() throws {
3939
self.router = TrieRouter()
4040
self.transport = OpenAPILambdaTransport(router: self.router)
4141
self.lambda = try .init(transport: self.transport)
@@ -49,7 +49,7 @@ public struct OpenAPILambdaHandler<L: OpenAPILambda>: Sendable {
4949
/// - context: Runtime ``LambdaContext``.
5050
///
5151
/// - Returns: A Lambda result ot type `Output`.
52-
public func handler(event: L.Event, context: LambdaContext) async throws -> L.Output {
52+
func handler(event: L.Event, context: LambdaContext) async throws -> L.Output {
5353

5454
// by default returns HTTP 500
5555
var lambdaResponse: OpenAPILambdaResponse = (HTTPResponse(status: .internalServerError), "unknown error")

0 commit comments

Comments
 (0)