Skip to content

Commit 02f5105

Browse files
committed
fixing tests
1 parent 3e295c7 commit 02f5105

File tree

61 files changed

+215
-215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+215
-215
lines changed

Tests/AnyCodableTests/AnyCodableTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class AnyCodableTests: XCTestCase {
99
let _: AnyCodable = 10
1010
let _: AnyCodable = 3.4
1111
let _: AnyCodable = "hello"
12-
let _: AnyCodable = ["hi", "there"]
13-
let _: AnyCodable = ["hi": "there"]
12+
let _: AnyCodable = .init(["hi", "there"])
13+
let _: AnyCodable = .init(["hi": "there"])
1414
}
1515

1616
func testEquality() throws {
@@ -153,12 +153,12 @@ class AnyCodableTests: XCTestCase {
153153
"boolean": true,
154154
"integer": 1,
155155
"string": "string",
156-
"array": [1, 2, 3],
157-
"nested": [
156+
"array": .init([1, 2, 3]),
157+
"nested": .init([
158158
"a": "alpha",
159159
"b": "bravo",
160160
"c": "charlie",
161-
],
161+
]),
162162
]
163163

164164
let result = try testStringFromEncoding(of: dictionary)

Tests/OpenAPIKit30ErrorReportingTests/ComponentErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class ComponentErrorTests: XCTestCase {
1414

Tests/OpenAPIKit30ErrorReportingTests/DocumentErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class DocumentErrorTests: XCTestCase {
1414

Tests/OpenAPIKit30ErrorReportingTests/Helpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
//
77

88
import Foundation
9-
import Yams
9+
@preconcurrency import Yams
1010

1111
let testDecoder = YAMLDecoder()

Tests/OpenAPIKit30ErrorReportingTests/JSONReferenceErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class JSONReferenceErrorTests: XCTestCase {
1414
func test_referenceFailedToParse() {

Tests/OpenAPIKit30ErrorReportingTests/OperationErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class OperationErrorTests: XCTestCase {
1414
func test_missingResponses() {

Tests/OpenAPIKit30ErrorReportingTests/PathsErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class PathsErrorTests: XCTestCase {
1414
func test_missingPaths() {

Tests/OpenAPIKit30ErrorReportingTests/RequestContentMapErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class RequestContentMapErrorTests: XCTestCase {
1414
/**

Tests/OpenAPIKit30ErrorReportingTests/RequestContentSchemaErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class RequestContentSchemaErrorTests: XCTestCase {
1414
func test_wrongTypeContentSchemaTypeProperty() {

Tests/OpenAPIKit30ErrorReportingTests/RequestErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class RequestErrorTests: XCTestCase {
1414
func test_wrongTypeRequest() {

Tests/OpenAPIKit30ErrorReportingTests/ResponseErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class ResponseErrorTests: XCTestCase {
1414
func test_headerWithContentAndSchema() {

Tests/OpenAPIKit30ErrorReportingTests/SchemaErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class SchemaErrorTests: XCTestCase {
1414
func test_nonIntegerMaximumForIntegerSchema() {

Tests/OpenAPIKit30ErrorReportingTests/SecuritySchemeErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class SecuritySchemeErrorTests: XCTestCase {
1414
func test_missingSecuritySchemeError() {

Tests/OpenAPIKit30RealSpecSuite/GitHubAPITests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import XCTest
99
import OpenAPIKit30
10-
import Yams
10+
@preconcurrency import Yams
1111
import Foundation
1212
#if canImport(FoundationNetworking)
1313
import FoundationNetworking

Tests/OpenAPIKit30RealSpecSuite/GoogleBooksAPITests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import XCTest
99
import OpenAPIKit30
10-
import Yams
10+
@preconcurrency import Yams
1111
import Foundation
1212
#if canImport(FoundationNetworking)
1313
import FoundationNetworking

Tests/OpenAPIKit30RealSpecSuite/PetStoreAPITests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import XCTest
99
import OpenAPIKit30
10-
import Yams
10+
@preconcurrency import Yams
1111
import Foundation
1212
#if canImport(FoundationNetworking)
1313
import FoundationNetworking

Tests/OpenAPIKit30RealSpecSuite/SwaggerDocSamplesTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99
import XCTest
1010
import OpenAPIKit30
11-
import Yams
11+
@preconcurrency import Yams
1212

1313
final class SwaggerDocSamplesTests: XCTestCase {
1414
func test_allOfExample() throws {

Tests/OpenAPIKit30RealSpecSuite/TomTomAPITests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import XCTest
99
import OpenAPIKit30
10-
import Yams
10+
@preconcurrency import Yams
1111
import Foundation
1212
#if canImport(FoundationNetworking)
1313
import FoundationNetworking

Tests/OpenAPIKit30Tests/ComponentsTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ extension ComponentsTests {
309309
)
310310
]
311311
],
312-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
312+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
313313
)
314314

315315
let encoded = try orderUnstableTestStringFromEncoding(of: t1)
@@ -504,7 +504,7 @@ extension ComponentsTests {
504504
)
505505
]
506506
],
507-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
507+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
508508
)
509509
)
510510
}

Tests/OpenAPIKit30Tests/Content/ContentTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ extension ContentTests {
205205

206206
func test_exampleAndSchemaContent_encode() {
207207
let content = OpenAPI.Content(schema: .init(.object(properties: ["hello": .string])),
208-
example: [ "hello": "world" ])
208+
example: .init([ "hello": "world" ]))
209209
let encodedContent = try! orderUnstableTestStringFromEncoding(of: content)
210210

211211
assertJSONEquivalent(
@@ -260,7 +260,7 @@ extension ContentTests {
260260

261261
func test_examplesAndSchemaContent_encode() {
262262
let content = OpenAPI.Content(schema: .init(.object(properties: ["hello": .string])),
263-
examples: ["hello": .b(OpenAPI.Example(value: .init([ "hello": "world" ])))])
263+
examples: ["hello": .b(OpenAPI.Example(value: .init(.init([ "hello": "world" ]))))])
264264
let encodedContent = try! orderUnstableTestStringFromEncoding(of: content)
265265

266266
assertJSONEquivalent(
@@ -405,7 +405,7 @@ extension ContentTests {
405405
func test_vendorExtensions_encode() {
406406
let content = OpenAPI.Content(
407407
schema: .init(.string),
408-
vendorExtensions: [ "x-hello": [ "world": 123 ] ]
408+
vendorExtensions: [ "x-hello": .init([ "world": 123 ]) ]
409409
)
410410

411411
let encodedContent = try! orderUnstableTestStringFromEncoding(of: content)
@@ -428,7 +428,7 @@ extension ContentTests {
428428
func test_vendorExtensions_encode_fixKey() {
429429
let content = OpenAPI.Content(
430430
schema: .init(.string),
431-
vendorExtensions: [ "hello": [ "world": 123 ] ]
431+
vendorExtensions: [ "hello": .init([ "world": 123 ]) ]
432432
)
433433

434434
let encodedContent = try! orderUnstableTestStringFromEncoding(of: content)

Tests/OpenAPIKit30Tests/Document/DocumentInfoTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ extension DocumentInfoTests {
103103
let license = OpenAPI.Document.Info.License(
104104
name: "MIT",
105105
url: URL(string: "http://website.com")!,
106-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
106+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
107107
)
108108

109109
let encodedLicense = try orderUnstableTestStringFromEncoding(of: license)
@@ -142,7 +142,7 @@ extension DocumentInfoTests {
142142
OpenAPI.Document.Info.License(
143143
name: "MIT",
144144
url: URL(string: "http://website.com")!,
145-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
145+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
146146
)
147147
)
148148
}
@@ -240,7 +240,7 @@ extension DocumentInfoTests {
240240
func test_contact_vendorExtensions_encode() throws {
241241
let contact = OpenAPI.Document.Info.Contact(
242242
email: "email",
243-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
243+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
244244
)
245245

246246
let encodedContact = try orderUnstableTestStringFromEncoding(of: contact)
@@ -276,7 +276,7 @@ extension DocumentInfoTests {
276276
contact,
277277
.init(
278278
email: "email",
279-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
279+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
280280
)
281281
)
282282
}
@@ -508,7 +508,7 @@ extension DocumentInfoTests {
508508
title: "title",
509509
license: .init(name: "license"),
510510
version: "1.0",
511-
vendorExtensions: ["x-speacialFeature": ["hello", "world"]]
511+
vendorExtensions: ["x-speacialFeature": .init(["hello", "world"])]
512512
)
513513

514514
let encodedInfo = try orderUnstableTestStringFromEncoding(of: info)
@@ -554,7 +554,7 @@ extension DocumentInfoTests {
554554
title: "title",
555555
license: .init(name: "license"),
556556
version: "1.0",
557-
vendorExtensions: ["x-speacialFeature": ["hello", "world"]]
557+
vendorExtensions: ["x-speacialFeature": .init(["hello", "world"])]
558558
)
559559
)
560560
}

Tests/OpenAPIKit30Tests/Document/DocumentTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ extension DocumentTests {
844844
paths: [:],
845845
components: .noComponents,
846846
externalDocs: .init(url: URL(string: "http://google.com")!),
847-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
847+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
848848
)
849849
let encodedDocument = try orderUnstableTestStringFromEncoding(of: document)
850850

@@ -903,7 +903,7 @@ extension DocumentTests {
903903
paths: [:],
904904
components: .noComponents,
905905
externalDocs: .init(url: URL(string: "http://google.com")!),
906-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
906+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
907907
)
908908
)
909909
}

Tests/OpenAPIKit30Tests/Document/ExternalDereferencingDocumentTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44

55
import Foundation
6-
import Yams
6+
@preconcurrency import Yams
77
import OpenAPIKit30
88
import XCTest
99

Tests/OpenAPIKit30Tests/Operation/OperationTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import XCTest
99
import OpenAPIKit30
10-
import Yams
10+
@preconcurrency import Yams
1111

1212
final class OperationTests: XCTestCase {
1313
func test_init() {
@@ -126,7 +126,7 @@ extension OperationTests {
126126
deprecated: true,
127127
security: [[.component(named: "security"): []]],
128128
servers: [.init(url: URL(string: "https://google.com")!)],
129-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
129+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
130130
)
131131

132132
let encodedOperation = try orderUnstableTestStringFromEncoding(of: operation)
@@ -298,7 +298,7 @@ extension OperationTests {
298298
deprecated: true,
299299
security: [[.component(named: "security"): []]],
300300
servers: [.init(url: URL(string: "https://google.com")!)],
301-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
301+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
302302
)
303303
)
304304

Tests/OpenAPIKit30Tests/Parameter/ParameterTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ extension ParameterTests {
827827
context: .path,
828828
schema: .string,
829829
description: "world",
830-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
830+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
831831
)
832832

833833
let encodedParameter = try orderUnstableTestStringFromEncoding(of: parameter)
@@ -880,7 +880,7 @@ extension ParameterTests {
880880
context: .path,
881881
schema: .string,
882882
description: "world",
883-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
883+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
884884
)
885885
)
886886
}

Tests/OpenAPIKit30Tests/Path Item/PathItemTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ extension PathItemTests {
175175
description: "description",
176176
servers: [OpenAPI.Server(url: URL(string: "http://google.com")!)],
177177
parameters: [.parameter(name: "hello", context: .query, schema: .string)],
178-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
178+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
179179
)
180180

181181
let encodedPathItem = try orderUnstableTestStringFromEncoding(of: pathItem)
@@ -245,7 +245,7 @@ extension PathItemTests {
245245
description: "description",
246246
servers: [OpenAPI.Server(url: URL(string: "http://google.com")!)],
247247
parameters: [.parameter(name: "hello", context: .query, schema: .string)],
248-
vendorExtensions: ["x-specialFeature": ["hello", "world"]]
248+
vendorExtensions: ["x-specialFeature": .init(["hello", "world"])]
249249
)
250250
)
251251
}

0 commit comments

Comments
 (0)