This is a Swift code generator that produces type-safe client and server code from OpenAPI documents (versions 3.0, 3.1, and preliminary 3.2). It is distributed as a Swift Package Manager build plugin, a command plugin, and a standalone CLI tool (`swift-openapi-generator`). The core architecture follows a pipeline: parse the OpenAPI document using YamsParser, translate the parsed representation into a structured Swift intermediate representation (IR) via a multiplex translator, and render the IR into Swift source files using a text-based renderer. The generated code is decoupled from specific HTTP transport libraries via `ClientTransport` and `ServerTransport` protocols, and supports middleware for cross-cutting concerns like logging, authentication, retrying, metrics, and tracing. The repository includes extensive examples covering a wide range of use cases: basic clients and servers, event streaming, multipart content, database integrations, and middleware stacks. The test suite is comprehensive, including unit tests, golden-file reference tests, and integration tests that compile and run generated code against mock transports. The project is actively maintained with a proposal process (SOAR) for feature additions and has a well-documented ecosystem of separate runtime and transport libraries.
Prefire is a Swift developer tool that scans SwiftUI source files, extracts `#Preview` macros and `PreviewProvider` declarations, and generates automated snapshot tests plus an interactive "Playbook" component catalog. It is not a data project: it is a CLI/code generator with a runtime library and SwiftPM/Xcode build-tool plugins. The real pipeline is: a build plugin invokes the `prefire` binary with target/source/config arguments; the binary parses sources using SwiftSyntax for `#Preview` macro ranges and a Sourcery fork for `PreviewProvider` types; a fingerprint-based cache avoids re-parsing unchanged files; Stencil templates (one for snapshot tests, one for playbook models) render generated Swift code; snapshot tests run against swift-snapshot-testing and the bundled Prefire runtime, while `PlaybookView` renders the generated `PreviewModels` inside an app.