e621e157e0
to macOS 10.15, iOS 13, tvOS 13, and watchOS 6 |
||
---|---|---|
Sources/OpenAPIHummingbird | ||
Tests/OpenAPIHummingbirdTests | ||
scripts | ||
.gitignore | ||
.swift-format | ||
CONTRIBUTORS.txt | ||
LICENSE | ||
Package.swift | ||
README.md |
README.md
Swift OpenAPI Hummingbird
Hummingbird transport for OpenAPI generator.
// Create your Hummingbird application.
let app = HBApplication()
// Create a Hummingbird OpenAPI Transport using your application.
let transport = HBOpenAPITransport(app)
// Create an instance of your handler type that conforms the generated protocol
// defining your service API.
let handler = MyServiceAPIImpl()
// Call the generated function on your implementation to add its request
// handlers to the app.
try handler.registerHandlers(on: transport, serverURL: Servers.server1())
// Start the app as you would normally.
try app.start()
app.wait()
Documentation
To get started, check out the full documentation, which contains step-by-step tutorials!