diff --git a/packages/swift-client/.gitignore b/packages/swift-client/.gitignore new file mode 100644 index 0000000..2d9f16e --- /dev/null +++ b/packages/swift-client/.gitignore @@ -0,0 +1,2 @@ +.build/ +.swiftpm/ diff --git a/packages/swift-client/Package.resolved b/packages/swift-client/Package.resolved new file mode 100644 index 0000000..5225661 --- /dev/null +++ b/packages/swift-client/Package.resolved @@ -0,0 +1,96 @@ +{ + "originHash" : "d6df3f02b0f88c906a23b57bde48004df9d9ca808a6756a7888a7ca7837397cb", + "pins" : [ + { + "identity" : "openapikit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mattpolzin/OpenAPIKit", + "state" : { + "revision" : "57b6318128e3f901c93f4fbf98d1c1464ec168d3", + "version" : "6.2.0" + } + }, + { + "identity" : "swift-algorithms", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-algorithms", + "state" : { + "revision" : "87e50f483c54e6efd60e885f7f5aa946cee68023", + "version" : "1.2.1" + } + }, + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "6a52f3251125d74daf04fcbd5e6f08a75d074382", + "version" : "1.8.2" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections", + "state" : { + "revision" : "a0cb0954ecb21e4e31b0070e6ed5674e8556685a", + "version" : "1.6.0" + } + }, + { + "identity" : "swift-http-types", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-http-types", + "state" : { + "revision" : "6c8ca8297332ea2780c45e1bce9d7fd2a8b51e1d", + "version" : "1.7.0" + } + }, + { + "identity" : "swift-numerics", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-numerics.git", + "state" : { + "revision" : "0c0290ff6b24942dadb83a929ffaaa1481df04a2", + "version" : "1.1.1" + } + }, + { + "identity" : "swift-openapi-generator", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-openapi-generator", + "state" : { + "revision" : "39d49cf22abab58a07f02bb76808b5d2839b294a", + "version" : "1.13.1" + } + }, + { + "identity" : "swift-openapi-runtime", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-openapi-runtime", + "state" : { + "revision" : "9e53df53e043b53046a371b31aaf0a1e26eef946", + "version" : "1.12.1" + } + }, + { + "identity" : "swift-openapi-urlsession", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-openapi-urlsession", + "state" : { + "revision" : "08796d36c99ad2318929bfa1d1e40f82194b65cc", + "version" : "1.3.1" + } + }, + { + "identity" : "yams", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jpsim/Yams", + "state" : { + "revision" : "a27b21e0c81c5bf42049b897a62aaf387e80f279", + "version" : "6.2.2" + } + } + ], + "version" : 3 +} diff --git a/packages/swift-client/Package.swift b/packages/swift-client/Package.swift new file mode 100644 index 0000000..7fd38cf --- /dev/null +++ b/packages/swift-client/Package.swift @@ -0,0 +1,24 @@ +// swift-tools-version: 6.1 +import PackageDescription + +let package = Package( + name: "CrateClient", + platforms: [.macOS(.v13), .iOS(.v16)], + products: [.library(name: "CrateClient", targets: ["CrateClient"])], + dependencies: [ + .package(url: "https://github.com/apple/swift-openapi-generator", exact: "1.13.1"), + .package(url: "https://github.com/apple/swift-openapi-runtime", exact: "1.12.1"), + .package(url: "https://github.com/apple/swift-openapi-urlsession", exact: "1.3.1"), + ], + targets: [ + .target( + name: "CrateClient", + dependencies: [ + .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), + .product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"), + ], + exclude: ["openapi.json", "openapi-generator-config.yaml"] + ), + .testTarget(name: "CrateClientTests", dependencies: ["CrateClient"]), + ] +) diff --git a/packages/swift-client/Sources/CrateClient/openapi-generator-config.yaml b/packages/swift-client/Sources/CrateClient/openapi-generator-config.yaml new file mode 100644 index 0000000..736542d --- /dev/null +++ b/packages/swift-client/Sources/CrateClient/openapi-generator-config.yaml @@ -0,0 +1,4 @@ +generate: + - types + - client +accessModifier: public