Skip to content

Commit c4f1d7a

Browse files
authored
Permit freeform source branch and platform identifiers in OpenAPI spec (#933)
* Permit freeform source branch and platform identifiers in OpenAPI specification * Fix test cases to adjust to change in the schema
1 parent 4adc2b6 commit c4f1d7a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

openapi/TestSwiftOrgClient/swiftorgClient/Tool.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ struct Tool {
6060
work: {
6161
_ = try await client.listDevToolchains(.init(
6262
path: .init(
63-
branch: branch,
64-
platform: platform
63+
branch: .init(value1: branch),
64+
platform: .init(value1: platform)
6565
)
6666
)).ok.body.json
6767
}
@@ -74,7 +74,7 @@ struct Tool {
7474
.init(
7575
name: "listStaticSDKDevToolchains(\(branch.rawValue))",
7676
work: {
77-
_ = try await client.listStaticSDKDevToolchains(.init(path: .init(branch: branch))).ok.body.json
77+
_ = try await client.listStaticSDKDevToolchains(.init(path: .init(branch: .init(value1: branch)))).ok.body.json
7878
}
7979
)
8080
)

openapi/swiftorg.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ paths:
3737
in: path
3838
required: true
3939
schema:
40-
$ref: '#/components/schemas/KnownSourceBranch'
40+
$ref: '#/components/schemas/SourceBranch'
4141
- name: platform
4242
in: path
4343
required: true
4444
schema:
45-
$ref: '#/components/schemas/KnownPlatformIdentifier'
45+
$ref: '#/components/schemas/PlatformIdentifier'
4646
get:
4747
operationId: listDevToolchains
4848
summary: Fetch all development toolchains
@@ -61,7 +61,7 @@ paths:
6161
in: path
6262
required: true
6363
schema:
64-
$ref: '#/components/schemas/KnownSourceBranch'
64+
$ref: '#/components/schemas/SourceBranch'
6565
get:
6666
operationId: listStaticSDKDevToolchains
6767
summary: Fetch all static SDK development toolchains

0 commit comments

Comments
 (0)