Code
Swift OpenAPI Generator – Generate Swift client and server code from an OpenAPI document

Generate Swift client and server code from an OpenAPI document.
Overview
OpenAPI is an open specification for documenting HTTP APIs.
Swift OpenAPI Generator is a Swift package plugin that can generate the ceremony code required to make API calls, or implement API servers.
Requirements and supported features
Generator versions | Supported OpenAPI versions | Minimum Swift version |
---|---|---|
0.1.0 … 0.1.11 |
3.0 | 5.8 |
0.1.12 … main |
3.0, 3.1 | 5.8 |
Supported platforms and minimum versions
The generator is used during development and is supported on macOS and Linux.
The generated code, runtime library, and transports are supported on more platforms, listed below.
Component | macOS | Linux | iOS | tvOS | watchOS |
---|---|---|---|---|---|
Generator plugin and CLI | ✅ 10.15+ | ✅ | ❌ | ❌ | ❌ |
Generated code, runtime, transports | ✅ 10.15+ | ✅ | ✅ 13+ | ✅ 13+ | ✅ 6+ |
Documentation
To get started, check out the full documentation, which contains step-by-step tutorials!
