mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
Regenerated from hanzoai/cloud's openapi.yaml at the commit .spec-lock now names, by hanzoai/openapi's generate.py under a `swift:` row — the same driver, the same pinned generator and the same document as every other client. What was here projected hanzo.yaml at info.version 8.0.0 through a generator version nothing else in the fleet uses, and recorded neither: 1937 of the 2308 addresses it published appear in neither cloud's emission nor any projection of it. This client publishes 2479, as 192 API types over 2460 models, with no dependency. Four things Swift needs said, all of them in the row: swift6 for typed throws, four model names its own modules own, the legacy snake/camel property pairs it would otherwise declare twice, and the two schemas that store themselves, which a struct cannot. One generator template is overridden so the transport compiles where corelibs Foundation keeps URLSession — which is what makes `swift build` a gate this fleet's runners can run. Package.swift comes from the generator now, so the language mode and the code it compiles have one home. The Carthage, CocoaPods and XcodeGen manifests are gone with the old generator's docs: SwiftPM resolves this package.
31 lines
1.1 KiB
Swift
31 lines
1.1 KiB
Swift
// swift-tools-version:6.0
|
|
|
|
// The example flows, as a package of their own so the client's manifest stays
|
|
// the generator's. It depends on the checkout it sits in, so `swift build
|
|
// --package-path examples` compiles the client and then every flow against it —
|
|
// which is what keeps an example from rotting when the document moves.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "examples",
|
|
platforms: [
|
|
.iOS(.v12),
|
|
.macOS(.v10_13),
|
|
.tvOS(.v12),
|
|
.watchOS(.v4),
|
|
],
|
|
dependencies: [
|
|
.package(name: "Hanzo", path: ".."),
|
|
],
|
|
targets: [
|
|
// Where the host and the credential are read. Once, for every flow.
|
|
// The dependency above names itself: a path dependency otherwise takes
|
|
// its package name from the DIRECTORY it sits in, which would bind
|
|
// these examples to whatever someone called their clone.
|
|
.target(name: "Flow", dependencies: [.product(name: "Hanzo", package: "Hanzo")]),
|
|
.executableTarget(name: "hello", dependencies: ["Flow"]),
|
|
.executableTarget(name: "models", dependencies: ["Flow"]),
|
|
]
|
|
)
|