Skip to content

Commit 1448b8d

Browse files
Update Swift SDK to 1.0.0-alpha.4
1 parent 683ccbd commit 1448b8d

8 files changed

Lines changed: 13810 additions & 2 deletions

File tree

.github/workflows/validate.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Validate Swift Package
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ["v*"]
7+
8+
jobs:
9+
validate:
10+
name: Validate Package (${{ matrix.swift }})
11+
runs-on: macos-15
12+
strategy:
13+
matrix:
14+
swift: ["5.9", "6.0"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: swift-actions/setup-swift@v2
19+
with:
20+
swift-version: ${{ matrix.swift }}
21+
22+
- name: Verify Package.swift is valid
23+
run: swift package dump-package | python3 -c "import sys,json; json.load(sys.stdin); print('Valid JSON')"
24+
25+
- name: Resolve dependencies
26+
run: swift package resolve
27+
28+
- name: Build
29+
run: swift build
30+
31+
- name: Build for release
32+
run: swift build -c release

.spi.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 1
2+
builder:
3+
configs:
4+
- documentation_targets: [ArtifactKeeperClient]
5+
platform: macos-spm
6+
- platform: ios
7+
- platform: watchos
8+
- platform: tvos

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Artifact Keeper
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Package.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "ArtifactKeeperClient",
6+
platforms: [
7+
.macOS(.v13),
8+
.iOS(.v16),
9+
.tvOS(.v16),
10+
.watchOS(.v9),
11+
],
12+
products: [
13+
.library(
14+
name: "ArtifactKeeperClient",
15+
targets: ["ArtifactKeeperClient"]
16+
),
17+
],
18+
dependencies: [
19+
.package(url: "https://github.com/apple/swift-openapi-generator", from: "1.6.0"),
20+
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.7.0"),
21+
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.0"),
22+
],
23+
targets: [
24+
.target(
25+
name: "ArtifactKeeperClient",
26+
dependencies: [
27+
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
28+
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
29+
],
30+
plugins: [
31+
.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator"),
32+
]
33+
),
34+
]
35+
)

README.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,47 @@
1-
# artifact-keeper-swift-sdk
2-
Managed by CI from [artifact-keeper-api](https://github.com/artifact-keeper/artifact-keeper-api). Do not push directly.
1+
# ArtifactKeeperClient
2+
3+
Swift client SDK for the [Artifact Keeper](https://github.com/artifact-keeper/artifact-keeper-api) REST API, generated from the OpenAPI 3.1 specification using [swift-openapi-generator](https://github.com/apple/swift-openapi-generator).
4+
5+
## Requirements
6+
7+
- Swift 5.9+
8+
- macOS 13+, iOS 16+, tvOS 16+, watchOS 9+
9+
10+
## Installation
11+
12+
Add the package to your `Package.swift`:
13+
14+
```swift
15+
dependencies: [
16+
.package(url: "https://github.com/artifact-keeper/artifact-keeper-swift-sdk.git", from: "1.0.0")
17+
]
18+
```
19+
20+
Then add the dependency to your target:
21+
22+
```swift
23+
.target(
24+
name: "YourTarget",
25+
dependencies: [
26+
.product(name: "ArtifactKeeperClient", package: "artifact-keeper-swift-sdk")
27+
]
28+
)
29+
```
30+
31+
## Usage
32+
33+
```swift
34+
import ArtifactKeeperClient
35+
import OpenAPIURLSession
36+
37+
let client = try Client(
38+
serverURL: URL(string: "https://your-instance.example.com/api")!,
39+
transport: URLSessionTransport()
40+
)
41+
42+
let response = try await client.listRepositories()
43+
```
44+
45+
## License
46+
47+
MIT
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This file is intentionally minimal.
2+
// The OpenAPI generator build plugin generates the actual client code at build time.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
generate:
2+
- types
3+
- client
4+
accessModifier: public

0 commit comments

Comments
 (0)