Releases: sisoje/swift-declarative-openapi-generator
Release list
1.1.0 — Credentials are read on their own actor
Description
Fixes a crash in any SwiftUI app whose credentials live in @Binding state.
Binding is @unchecked Sendable, but its getter and setter are
@isolated(any) — the value moves between actors freely, the accessors don't.
The Supabase wiring read its credentials inside request building, which runs
@concurrent, so every request traps. Tests missed it because .constant
carries no isolation.
Credentials are now read in one hop on the main actor; composition still runs
off it. RefreshingExecutor's gate is @MainActor rather than capturing
#isolation at construction, which was only correct when the executor and the
bindings were built on the same actor.
Source-breaking, theoretical for most callers: NetworkExecution.request is
now async (sync builders convert implicitly, so existing call sites compile
unchanged), and RefreshingExecutor.init drops its defaulted isolation:
parameter.
1.0.0 — OpenAPI in, a pure Swift client
First release of swift-declarative-openapi: a code generator that turns an OpenAPI
document into a compile-checked BackendSpec for
swift-declarative-requests — the
whole backend as one closed Swift type with typed operations, models, and security gates.
▎ Token refresh is isolation-correct by construction: the executor captures #isolation at init (the same mechanism Task {} and SwiftUI's Binding use) and runs its single-flight gate there — a background call through the typed client still refreshes on the actor that owns the tokens, witnessed by tests.