Use operation summary and description in generated function docs (#67)
Motivation
For generated functions for each operations we generate reference documentation. Currently this only states the HTTP information and the operation ID, and doesn’t include either the
summary
or thedescription
that may be present in the OpenAPI document.Modifications
Change the reference documentation to include both the summary and the description if they are provided.
Result
Reference documentation for operation functions contains the documentation from the OpenAPI document.
Test Plan
The OpenAPI document used in the reference test includes operations with and without these fields.
Resolves
- Resolves #64.
Signed-off-by: Si Beaumont beaumont@apple.com
Swift OpenAPI Generator
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.
Repository organization
The Swift OpenAPI Generator project is split across multiple repositories to enable extensibility and minimize dependencies in your project.
swift-openapi-generator (source, docs) provides the plugin.
swift-openapi-runtime (source, docs) provides a library with common types and abstractions used by the generated code.
Choose one of the transports listed below, or create your own by adopting the
ClientTransport
orServerTransport
protocol:URLSession
from Foundation.HTTPClient
from AsyncHTTPClient.Requirements and supported features
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.
Documentation
To get started, check out the full documentation, which contains step-by-step tutorials!