tib / swift-openapi-vapor

Vapor Bindings for the OpenAPI Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift OpenAPI Vapor

This package provides Vapor Bindings for the OpenAPI generator.

Usage

In entrypoint.swift add:

// Create a Vapor OpenAPI Transport using your application.
let transport = VaporOpenAPITransport(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())

Documentation

To get started, check out the full documentation, which contains step-by-step tutorials!

About

Vapor Bindings for the OpenAPI Generator

License:Apache License 2.0


Languages

Language:Swift 71.2%Language:Shell 26.2%Language:Dockerfile 2.6%