Motivation:
Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.
Modifications:
* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml
Result:
Code reflects our support window.
Motivation:
Swift 6.3 has been released, we should add it to our CI coverage.
Modifications:
Add additional Swift 6.3 jobs where appropriate in main.yml,
pull_request.yml
Result:
Improved test coverage.
Uses `FoundationEssentials` instead of `Foundation`. Also removes
`NIOFoundationCompat`, because it did appear to be used, and that pulled
in the entire Foundation.
Also disabled the default traits for the `OpenAPIRuntime` to prevent
linking Foundation.
Motivation
* Following [GitHub's
announcement](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/),
Node 20 is being deprecated and runners will begin using Node 24 by
default starting March 4th, 2026. Node 20 will reach end-of-life in
April 2026.
Modifications
* Upgrade GitHub Actions to their latest versions to ensure
compatibility with Node 24.
* Replace `actions/checkout@v4` with `actions/checkout@v6` in all
workflow files.
Result
* Workflow files reference `actions/checkout@v6`.
Motivation:
* More secure GitHub Actions workflows
Modifications:
Add explicit 'contents: read' permissions to workflows that did not have
explicit permissions defined. This follows GitHub Actions security best
practices by limiting the default GITHUB_TOKEN permissions.
Result:
An extra layer of security.
Motivation:
Swift 6.2 has been released, we should add it to our CI coverage.
Modifications:
Add additional Swift 6.2 jobs where appropriate in main.yml,
pull_request.yml
Result:
Improved test coverage.
### Motivation:
Some errors do not show up in debug builds. Enabling release mode builds
improves the CI coverage.
### Modifications:
Enable release mode builds for pull requests and scheduled builds on
main.
### Result:
Improved CI coverage.
Motivation:
Swift 5.9 is no longer supported, we should bump the tools version and
remove it from our CI.
Modifications:
* Bump the Swift tools version to Swift 5.10
* Remove Swift 5.9 jobs where appropriate in main.yml, pull_request.yml
Result:
Code reflects our support window.
Motivation:
Swift 6.1 has been released, we should add it to our CI coverage.
Modifications:
Add additional Swift 6.1 jobs where appropriate in main.yml,
pull_request.yml
Result:
Improved test coverage.
### Motivation
We're trying to lock in strict concurrency across the package ecosystem
and standardise on how that's tested.
### Modifications
- Add `StrictConcurrency=complete` feature flag to all targets in the
package manifest
- Remove now superfluous strict concurrency compiler flag in CI runs
- Add a new CI pipeline that tests the package with Swift 6 language
mode.
### Result
- Package configuration consistent with others adopting strict
concurrency.
- Swift 6 language mode pipeline established to catch regressions.
Enable MemberImportVisibility check on all targets. Use a standard
string header and footer to bracket the new block for ease of updating
in the future with scripts.
Migrate CI to use GitHub Actions.
### Motivation:
To migrate to GitHub actions and centralised infrastructure.
### Modifications:
Changes of note:
* Adopt swiftlang soundness checks, swift version matrix
* Remove scripts and docker files which are no longer needed
### Result:
Feature parity with old CI.
### Test Plan
Execute CI
### Motivation
As a convenience when you don't need to create a custom AHC Client
instance, we provide a singleton client as the default. AHC added their
own `Client.shared` singleton, so let's adopt that and remove the
transport's internal singleton, which was used for the same purpose.
### Modifications
- Replaced the tranport's internal singleton with the AHC-provided one.
- Use Int64 directly and skip conversions now that AHC also uses Int64
for the body byte size.
### Result
- No internal singleton is created now, possibly avoiding having two AHC
singletons in a given process.
- Fixed a warning around Int/Int64 conversion.
### Test Plan
Unit tests still pass.
### Motivation
We centralize the issues for all the repos in the Swift OpenAPI
Generator project in the generator repo. Using an issue template will
make this even clearer, because it will allow people to use the normal
Github workflow to discover the process and provide a link to where to
file their issue.
### Modifications
Add issue template, redirecting to swift-openapi-generator issues.
### Result
When people try and file an issue, they'll be presented with a button
that takes them to the generator repo issues page.
### Test Plan
Manual.
### Motivation
Recent SwiftPM versions seem to be a bit stricter about using (i.e.,
`import ...`) transitive dependencies without explicitly declaring them
as direct dependencies.
### Modifications
Explicitly depend on the HTTPTypes module from swift-http-types.
### Result
More explicitly declare the dependency graph.
### Test Plan
All tests pass.
Default the configuration parameter
### Motivation
The AsyncHTTPClient transport API has undergone changes in recent months and we didn't bring back the default initializer after we adopted the shared EventLoopGroup, allowing you to create a transport with just `let transport = AsyncHTTPClientTransport()`.
### Modifications
Default the configuration parameter in the initializer to be able to do that. It's already documented to work, but it doesn't.
### Result
Match the documented behavior of being able to use `let transport = AsyncHTTPClientTransport()`.
### Test Plan
Tests still pass.
Reviewed by: dnadoba
Builds:
✔︎ pull request validation (5.10) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/32
### Motivation
While this isn't technically necessary, as all versions of a platform
not explicitly mentioned are assumed to be supported, it's better to be
explicit here.
### Modifications
Add `visionOS(.v1)` to the list of supported platforms.
### Result
Clearer support matrix.
### Test Plan
N/A, this is basically just a documentation change.
Handle large payloads on 32bit platforms gracefully
### Motivation
If there's a request payload with a number of bytes that can't fit into 32 bits, we'd crash.
### Modifications
Use a graceful initializer and use `.unknown` (so no `content-length` will be sent) if the size exceeds the max of a 32bit int.
### Result
No crash for large payloads on 32bit platforms.
### Test Plan
Tests pass.
Reviewed by: dnadoba
Builds:
✔︎ pull request validation (5.10) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/29
### Motivation
In #26 we bumped the minimum tools version to Swift 5.9, but we left the
`#if swift(>5.9)` compiler directive when enabling existential any by
default.
### Modifications
Remove #if swift(>=5.9) check in Package.swift
### Result
No checking for Swift 5.9+, because that's now the default.
### Test Plan
CI.
### Motivation
On main, the HTTPBody length type changed from Int to Int64.
### Modifications
Adapted the transport with this change.
### Result
Repo builds again when using the latest runtime.
### Test Plan
Adapted tests.
### Motivation
Surface the Swift version and platform support status from Swift Package
Index.
### Modifications
Added badges, plus a quick link to the docc docs, to the top of the
README.
Also, expanded the supported platforms, we do actually support iOS and
friends (was an oversight not to include it before).
### Result
Easier to quickly see our support matrix, plus the quick link to docs.
### Test Plan
Previewed locally.
### Motivation
- Relates to
[#230](https://github.com/apple/swift-openapi-generator/issues/230)
### Modifications
- Disable respectsExistingLineBreaks .swift-format rule and address
changes requested
### Result
- One of the .swift-format rules will be disabled
### Test Plan
- Run Tests
Add a soundness --fix flag
### Motivation
When running `./scripts/soundness.sh` produces swift-format warnings, we ask adopters to manually copy/paste a call to swift format to fix the warnings up. This is tedious and unnecessary.
### Modifications
Add a `--fix` option on the `soundness.sh` script to actually apply the fixes as well, avoiding the need to copy/paste long commands.
### Result
Easier fixing up of formatting warnings.
### Test Plan
Manually tested the workflow locally.
Reviewed by: glbrntt
Builds:
✔︎ pull request validation (5.10) - Build finished.
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/22
### Motivation
Now Swift 5.9 is released and 5.10 nightly images are available, we
should update our CI to use the official release for 5.10 and setup a
new CI for 5.10.
### Modifications
- Update 5.9 CI to use `swift:5.9-jammy`
- Add new CI for `swiftlang/swift:nightly-5.10-jammy`
### Result
- 5.9 CI is using official released image.
- 5.10 CI can be brought online.
### Test Plan
Running both of these commands locally succeed:
```console
% docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.2204.59.yaml run test
```
```console
% docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.2204.510.yaml run test
```
### Motivation
We previously defaulted the HTTPClient to .init(), but that's not
correct as it was never getting shut down.
### Modifications
Instead of creating a new client, just introduce our own shared one and
use that as the default value.
Once AHC provides a shared client, we can default to that in the
configuration initializer.
### Result
No more crashing clients on dealloc.
### Test Plan
All tests pass.
---------
Co-authored-by: David Nadoba <dnadoba@gmail.com>
Fix double encoding of path parameters
### Motivation
Fixes https://github.com/apple/swift-openapi-generator/issues/251.
### Modifications
Use the already escaped path setter on `URLComponents` to avoid the second encoding pass.
### Result
Path parameters that needed escaping are only escaped once, not twice.
### Test Plan
Adapted the existing unit test to cover a path item that needs escaping.
Reviewed by: simonjbeaumont
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/15
Prepare being compatible with runtime 0.2.0 release
### Motivation
Runtime 0.2.0 is compatible with 0.1.3+ in the APIs adopted in the transport, so just reflect that in the manifest.
### Modifications
Increased the supported runtime range to include 0.2.x.
### Result
Once released, folks will be able to use 0.1.x of this transport with both 0.1.x and 0.2.x of runtime.
### Test Plan
Will be manually tested once runtime 0.2.0 is released.
Reviewed by: gjcairo
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/12
Adopt the new shared HTTP client
### Motivation
Now that SwiftNIO/AsyncHTTPClient have a singleton variant of the `EventLoopGroup`, which allows creating an `HTTPClient` without any argument, let's simplify the initializer of the transport to take advantage of it - bringing it in line with the URLSession transport.
### Modifications
Default the HTTPClient to a new one with a default event loop group, and remove the mandatory shutdown call.
### Result
Adopters can more easily create the AHC transport.
### Test Plan
N/A
Reviewed by: dnadoba, glbrntt
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/13
Enable strict concurrency checking in CI
### Motivation
To further avoid concurrency bugs, enable complete concurrency checking in CI.
### Modifications
Added the compiler flag to the docker-compose scripts.
### Result
If a warning of this nature comes up, because we have warnings-as-errors, it'll fail CI.
### Test Plan
Locally built without any warnings with the flag enabled.
Reviewed by: glbrntt
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/11
[AHCTransport] Consistent style for initializing local variables
### Motivation
Move to a consistent style when initializing local variables, always use `let foo = Foo(...)` vs `let foo: Foo = .init(...)`.
### Modifications
Updated all occurrences of the latter to use the former.
### Result
Consistent local variable initialization.
### Test Plan
All tests passed.
Reviewed by: gjcairo, simonjbeaumont
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/10
Disable ExistentialAny temporarily
### Motivation
Unfortunately until we adopt 5.9, adding ExistentialAny on upstream packages has unintended consequences for some downstream packages, so disabling for now. Details in https://github.com/apple/swift-openapi-generator/issues/120
### Modifications
Disabled the feature enforcement, but the code changes are there, so downstream adopters can still use them.
### Result
We won't be seeing the issue described in https://github.com/apple/swift-openapi-generator/issues/120.
### Test Plan
PR CI, which discovered the original issue.
Reviewed by: simonjbeaumont
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/9
### Motivation
Relax deployment target to macOS 10.15
### Modifications
- Reduced requirement from macOS 13 to macOS 10.15
- Added the minimum version to readme and documentation
### Result
- Users will be able to deploy it on projects with a minimum deployment
target of 10.15
Use an SSH URL to fetch Runtime in CI
(Same as: https://github.com/apple/swift-openapi-generator/pull/3)
### Motivation
Until the swift-openapi-runtime repository is made public, it cannot be
cloned using a HTTPS package URL without authentication, which is what
this package is using in its Package.swift.
This means CI isn't able to run for this package. However, CI is able to
clone this repository over SSH, which presents an opportunity for a
temporary workaround.
### Modifications
Add a temporary step to the Docker Compose CI flow, which creates a Git
config in a shared ephemeral volume with the following contents:
```gitconfig
[url "git@github.com:apple/swift-openapi-runtime"]
insteadOf = https://github.com/apple/swift-openapi-runtime
```
### Result
The CI should be able to clone the private dependency and then succeed.
### Test Plan
Locally, this works:
```console
❯ docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.2204.58.yaml run test
...
+ swift test -Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error
...
Fetching https://github.com/apple/swift-openapi-runtime
...
Fetched https://github.com/apple/swift-openapi-runtime (2.68s)
...
Executed 86 tests, with 0 failures (0 unexpected) in 3.265 (3.265) seconds
```
Also, if we use can use the `shell` Docker Compose service to see things
are configured correctly:
```console
root@20ab69e3f292:/code# echo $GIT_CONFIG_GLOBAL
/ci-gitconfig/gitconfig
root@20ab69e3f292:/code# cat $GIT_CONFIG_GLOBAL
[url "git@github.com:apple/swift-openapi-runtime"]
insteadOf = https://github.com/apple/swift-openapi-runtime
```
Reviewed by: simonjbeaumont
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
https://github.com/swift-server/swift-openapi-async-http-client/pull/3