swift-openapi-runtime

1.8.3

API package for code generated by Swift OpenAPI Generator.
apple/swift-openapi-runtime

What's New

1.8.3

2025-09-17T14:01:40Z

What's Changed

SemVer Patch

  • Fix typo in MultiError by @czechboy0 in #154
  • Fix encoding of OpenAPI{Object,Value}Container to allow multiple encodings in anyOf/allOf by @czechboy0 in #156

Other Changes

  • Switch integration tests to newer Swift test matrix by @rnro in #150
  • Enable Swift 6.1 jobs in CI by @rnro in #151
  • move nightly disable parameter in main.yml by @rnro in #152
  • main.yml - add /swift-openapi-runtime as safe directory by @rnro in #153
  • Enable release mode builds by @josephnoir in #155

New Contributors

Full Changelog: 1.8.2...1.8.3

Swift OpenAPI Generator Runtime

This library provides common abstractions and helper functions used by the client and server code generated by Swift OpenAPI Generator.

Overview

It contains:

Many of the HTTP currency types used are defined in the Swift HTTP Types library.

Tip: Check out the example projects focused on middlewares.

Usage

Add the package dependency in your Package.swift:

.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.0.0"),

Next, in your target, add OpenAPIRuntime to your dependencies:

.target(name: "MyTarget", dependencies: [
    .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
]),

The next step depends on your use case.

Using Swift OpenAPI Generator for code generation

The generated code depends on types from this library. Check out the adoption guides in the Swift OpenAPI Generator documentation to see how the packages fit together.

Implementing transports and middlewares

Swift OpenAPI Generator generates client and server code that is designed to be used with pluggable transports and middlewares.

Implement a new transport or middleware by providing a type that adopts one of the protocols from the runtime library:

You can also publish your transport or middleware as a Swift package to allow others to use it with their generated code.

Documentation

To learn more, check out the full documentation.

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Thu Nov 20 2025 03:06:14 GMT-1000 (Hawaii-Aleutian Standard Time)