@@ -40,39 +40,44 @@ final class CompatibilityTest: XCTestCase {
40
40
try await _test (
41
41
" https://raw.githubusercontent.com/aws/aws-lambda-dotnet/7a516b80d83a5c5f5d951158b16b8f76120035cc/Libraries/src/Amazon.Lambda.RuntimeSupport/Client/runtime-api.yaml " ,
42
42
license: . apache,
43
- expectedDiagnostics: [ ]
43
+ expectedDiagnostics: [ ] ,
44
+ skipBuild: compatibilityTestSkipBuild
44
45
)
45
46
}
46
47
47
48
func testAzureIOTIdentityService( ) async throws {
48
49
try await _test (
49
50
" https://raw.githubusercontent.com/Azure/iot-identity-service/6404c3bebcc03f12c441c5b018803256bfe1fffe/key/aziot-keyd/openapi/2021-05-01.yaml " ,
50
51
license: . mit,
51
- expectedDiagnostics: [ ]
52
+ expectedDiagnostics: [ ] ,
53
+ skipBuild: compatibilityTestSkipBuild
52
54
)
53
55
}
54
56
55
57
func testBox( ) async throws {
56
58
try await _test (
57
59
" https://raw.githubusercontent.com/box/box-openapi/5955d651f0cd273c0968e3855c1d873c7ae3523e/openapi.json " ,
58
60
license: . apache,
59
- expectedDiagnostics: [ ]
61
+ expectedDiagnostics: [ ] ,
62
+ skipBuild: compatibilityTestSkipBuild
60
63
)
61
64
}
62
65
63
66
func testCiscoMindmeld( ) async throws {
64
67
try await _test (
65
68
" https://raw.githubusercontent.com/cisco/mindmeld/bd3547d5c1bd092dbd4a64a90528dfc2e2b3844a/mindmeld/openapi/custom_action.yaml " ,
66
69
license: . apache,
67
- expectedDiagnostics: [ ]
70
+ expectedDiagnostics: [ ] ,
71
+ skipBuild: compatibilityTestSkipBuild
68
72
)
69
73
}
70
74
71
75
func testCloudHypervisor( ) async throws {
72
76
try await _test (
73
77
" https://raw.githubusercontent.com/cloud-hypervisor/cloud-hypervisor/889d06277acae45c2b55bd5f6298ca2b21a55cbb/vmm/src/api/openapi/cloud-hypervisor.yaml " ,
74
78
license: . apache,
75
- expectedDiagnostics: [ ]
79
+ expectedDiagnostics: [ ] ,
80
+ skipBuild: compatibilityTestSkipBuild
76
81
)
77
82
}
78
83
@@ -82,92 +87,104 @@ final class CompatibilityTest: XCTestCase {
82
87
license: . apache,
83
88
expectedDiagnostics: [
84
89
" Validation warning: Inconsistency encountered when parsing `OpenAPI Schema`: Found nothing but unsupported attributes.. "
85
- ]
90
+ ] ,
91
+ skipBuild: compatibilityTestSkipBuild
86
92
)
87
93
}
88
94
89
95
func testGithub( ) async throws {
90
96
try await _test (
91
97
" https://raw.githubusercontent.com/github/rest-api-description/13c873cb3b15ffd5bcd88c6d6270a963ef4518f6/descriptions/api.github.com/api.github.com.yaml " ,
92
98
license: . mit,
93
- expectedDiagnostics: [ ]
99
+ expectedDiagnostics: [ ] ,
100
+ skipBuild: true
94
101
)
95
102
}
96
103
97
104
func testGithubEnterprise( ) async throws {
98
105
try await _test (
99
106
" https://raw.githubusercontent.com/github/rest-api-description/13c873cb3b15ffd5bcd88c6d6270a963ef4518f6/descriptions/ghes-3.5/ghes-3.5.yaml " ,
100
107
license: . mit,
101
- expectedDiagnostics: [ ]
108
+ expectedDiagnostics: [ ] ,
109
+ skipBuild: true
102
110
)
103
111
}
104
112
105
113
func testKubernetes( ) async throws {
106
114
try await _test (
107
115
" https://raw.githubusercontent.com/kubernetes/kubernetes/fa3d7990104d7c1f16943a67f11b154b71f6a132/api/openapi-spec/v3/api__v1_openapi.json " ,
108
116
license: . apache,
109
- expectedDiagnostics: [ ]
117
+ expectedDiagnostics: [ ] ,
118
+ skipBuild: compatibilityTestSkipBuild
110
119
)
111
120
}
112
121
113
122
func testNetflixConsoleMe( ) async throws {
114
123
try await _test (
115
124
" https://raw.githubusercontent.com/Netflix/consoleme/774420462b0190b1bfa78aa73d39e20044f52db9/swagger.yaml " ,
116
125
license: . apache,
117
- expectedDiagnostics: [ ]
126
+ expectedDiagnostics: [ ] ,
127
+ skipBuild: compatibilityTestSkipBuild
118
128
)
119
129
}
120
130
121
131
func testOpenAI( ) async throws {
122
132
try await _test (
123
133
" https://raw.githubusercontent.com/openai/openai-openapi/ec0b3953bfa08a92782bdccf34c1931b13402f56/openapi.yaml " ,
124
134
license: . mit,
125
- expectedDiagnostics: [ ]
135
+ expectedDiagnostics: [ ] ,
136
+ skipBuild: compatibilityTestSkipBuild
126
137
)
127
138
}
128
139
129
140
func testOpenAPIExamplesPetstore( ) async throws {
130
141
try await _test (
131
142
" https://raw.githubusercontent.com/OAI/OpenAPI-Specification/9dff244e5708fbe16e768738f4f17cf3fddf4066/examples/v3.0/petstore.yaml " ,
132
143
license: . apache,
133
- expectedDiagnostics: [ ]
144
+ expectedDiagnostics: [ ] ,
145
+ skipBuild: compatibilityTestSkipBuild
134
146
)
135
147
}
136
148
137
149
func testOpenAPIExamplesPetstoreExpanded( ) async throws {
138
150
try await _test (
139
151
" https://raw.githubusercontent.com/OAI/OpenAPI-Specification/9dff244e5708fbe16e768738f4f17cf3fddf4066/examples/v3.0/petstore-expanded.yaml " ,
140
152
license: . apache,
141
- expectedDiagnostics: [ ]
153
+ expectedDiagnostics: [ ] ,
154
+ skipBuild: compatibilityTestSkipBuild
142
155
)
143
156
}
144
157
func testOpenAPIExamplesAPIWithExamples( ) async throws {
145
158
try await _test (
146
159
" https://raw.githubusercontent.com/OAI/OpenAPI-Specification/9dff244e5708fbe16e768738f4f17cf3fddf4066/examples/v3.0/api-with-examples.yaml " ,
147
160
license: . apache,
148
- expectedDiagnostics: [ ]
161
+ expectedDiagnostics: [ ] ,
162
+ skipBuild: compatibilityTestSkipBuild
149
163
)
150
164
}
151
165
func testOpenAPIExamplesCallbackExample( ) async throws {
152
166
try await _test (
153
167
" https://raw.githubusercontent.com/OAI/OpenAPI-Specification/9dff244e5708fbe16e768738f4f17cf3fddf4066/examples/v3.0/callback-example.yaml " ,
154
168
license: . apache,
155
- expectedDiagnostics: [ ]
169
+ expectedDiagnostics: [ ] ,
170
+ skipBuild: compatibilityTestSkipBuild
156
171
)
157
172
}
158
173
func testOpenAPIExamplesLinkExample( ) async throws {
159
174
try await _test (
160
175
" https://raw.githubusercontent.com/OAI/OpenAPI-Specification/9dff244e5708fbe16e768738f4f17cf3fddf4066/examples/v3.0/link-example.yaml " ,
161
176
license: . apache,
162
- expectedDiagnostics: [ ]
177
+ expectedDiagnostics: [ ] ,
178
+ skipBuild: compatibilityTestSkipBuild
163
179
)
164
180
}
165
181
166
182
func testSwiftPackageRegistry( ) async throws {
167
183
try await _test (
168
184
" https://raw.githubusercontent.com/apple/swift-package-manager/ce0ff6f223122c88cbf24a0eca8424664e2fb1f1/Documentation/PackageRegistry/registry.openapi.yaml " ,
169
185
license: . apache,
170
- expectedDiagnostics: [ ]
186
+ expectedDiagnostics: [ ] ,
187
+ skipBuild: compatibilityTestSkipBuild
171
188
)
172
189
}
173
190
}
@@ -189,7 +206,8 @@ fileprivate extension CompatibilityTest {
189
206
func _test(
190
207
_ documentURL: String ,
191
208
license: License ,
192
- expectedDiagnostics: Set < String > = [ ]
209
+ expectedDiagnostics: Set < String > = [ ] ,
210
+ skipBuild: Bool = false
193
211
) async throws {
194
212
let diagnosticsCollector = RecordingDiagnosticCollector ( )
195
213
@@ -230,7 +248,7 @@ fileprivate extension CompatibilityTest {
230
248
XCTAssertEqual ( Set ( diagnosticsCollector. diagnostics. map ( \. message) ) , expectedDiagnostics)
231
249
XCTAssertEqual ( outputs. count, 3 )
232
250
233
- if !compatibilityTestSkipBuild {
251
+ if !skipBuild {
234
252
// Create Swift package test harness.
235
253
let packageName = " swift-openapi-compatibility-test- \( testCaseName) "
236
254
let packageDir = FileManager . default. temporaryDirectory. appendingPathComponent (
0 commit comments