From 665dd00dfeab574c1b3cc13d58c4bfcc00824376 Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Wed, 27 Mar 2024 09:22:39 -0500 Subject: [PATCH 1/4] run codecov against Swift 5.8 and run test matrix against 5.10 in addition to other versions --- .github/workflows/codecov.yml | 2 +- .github/workflows/tests.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 668c51c80..0d392008d 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -5,7 +5,7 @@ on: [pull_request] jobs: codecov: container: - image: swift:5.7 + image: swift:5.8 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 442b5d5ee..9d7d6c320 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,6 +76,9 @@ jobs: - swift:5.9-focal - swift:5.9-jammy - swift:5.9-amazonlinux2 + - swift:5.10-focal + - swift:5.10-jammy + - swift:5.10-amazonlinux2 - swiftlang/swift:nightly-bionic - swiftlang/swift:nightly-focal - swiftlang/swift:nightly-jammy From d6cb6d76d547c9a1e593e4bb0825dfeecd28cc0b Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Sat, 13 Apr 2024 13:57:32 -0500 Subject: [PATCH 2/4] Update phrasing in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 453707b66..16ffa8797 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ let encodedOpenAPIDoc = try encoder.encode(openAPIDoc) ### Validating OpenAPI Documents Thanks to Swift's type system, the vast majority of the OpenAPI Specification is represented by the types of OpenAPIKit -- you cannot create bad OpenAPI docuements in the first place and decoding a document will fail with generally useful errors. -That being said, there are a small number of additional checks that you can perform to really put any concerns to bed. +That being said, there are a small number of additional checks that you can perform to really put any concerns to rest. ```swift let openAPIDoc: OpenAPI.Document = ... From ad5ebb991703d2458ae2a3801f4189b0f5b036dc Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Sun, 21 Apr 2024 13:53:23 -0500 Subject: [PATCH 3/4] Fix equality comparison of URL AnyCodables --- Sources/OpenAPIKitCore/AnyCodable/AnyCodable.swift | 2 ++ Tests/AnyCodableTests/AnyCodableTests.swift | 1 + 2 files changed, 3 insertions(+) diff --git a/Sources/OpenAPIKitCore/AnyCodable/AnyCodable.swift b/Sources/OpenAPIKitCore/AnyCodable/AnyCodable.swift index de8b82aa1..f6e4050d1 100644 --- a/Sources/OpenAPIKitCore/AnyCodable/AnyCodable.swift +++ b/Sources/OpenAPIKitCore/AnyCodable/AnyCodable.swift @@ -186,6 +186,8 @@ extension AnyCodable: Equatable { return lhs == rhs case let (lhs as String, rhs as String): return lhs == rhs + case let (lhs as URL, rhs as URL): + return lhs == rhs case let (lhs as [String: String], rhs as [String: String]): return lhs == rhs case let (lhs as [String: Int], rhs as [String: Int]): diff --git a/Tests/AnyCodableTests/AnyCodableTests.swift b/Tests/AnyCodableTests/AnyCodableTests.swift index 9d17d7c7d..78831567f 100644 --- a/Tests/AnyCodableTests/AnyCodableTests.swift +++ b/Tests/AnyCodableTests/AnyCodableTests.swift @@ -29,6 +29,7 @@ class AnyCodableTests: XCTestCase { XCTAssertEqual(AnyCodable(Float(2)), AnyCodable(Float(2))) XCTAssertEqual(AnyCodable(Double(2)), AnyCodable(Double(2))) XCTAssertEqual(AnyCodable("hi"), AnyCodable("hi")) + XCTAssertEqual(AnyCodable(URL(string: "file://./params/name.json")), AnyCodable(URL(string: "file://./params/name.json"))) XCTAssertEqual(AnyCodable(["hi": AnyCodable(2)]), AnyCodable(["hi": AnyCodable(2)])) XCTAssertEqual(AnyCodable([AnyCodable("hi"), AnyCodable("there")]), AnyCodable([AnyCodable("hi"), AnyCodable("there")])) XCTAssertEqual(AnyCodable(["hi":1]), AnyCodable(["hi":1])) From 4a905d6eea30ceb76b9d05f720253c190469396e Mon Sep 17 00:00:00 2001 From: Tim Mahoney Date: Mon, 20 May 2024 11:19:28 -0700 Subject: [PATCH 4/4] secutity -> security --- Sources/OpenAPIKit/Operation/DereferencedOperation.swift | 2 +- Sources/OpenAPIKit/Operation/Operation.swift | 2 +- Sources/OpenAPIKit30/Operation/DereferencedOperation.swift | 2 +- Sources/OpenAPIKit30/Operation/Operation.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/OpenAPIKit/Operation/DereferencedOperation.swift b/Sources/OpenAPIKit/Operation/DereferencedOperation.swift index da2a06050..9beaf77f9 100644 --- a/Sources/OpenAPIKit/Operation/DereferencedOperation.swift +++ b/Sources/OpenAPIKit/Operation/DereferencedOperation.swift @@ -28,7 +28,7 @@ public struct DereferencedOperation: Equatable { /// If defined, overrides the security requirements in the /// root document `security` array. /// - /// Each secutity requirement in this array is an alternative, only + /// Each security requirement in this array is an alternative, only /// one of which must be met for the request to be authorized. /// /// By contrast, all entries in an individual `DereferencedSecurityRequirement` diff --git a/Sources/OpenAPIKit/Operation/Operation.swift b/Sources/OpenAPIKit/Operation/Operation.swift index 4efdc5899..73f517d95 100644 --- a/Sources/OpenAPIKit/Operation/Operation.swift +++ b/Sources/OpenAPIKit/Operation/Operation.swift @@ -86,7 +86,7 @@ extension OpenAPI { /// If defined, overrides the security requirements in the /// root `OpenAPI.Document` `security` array. /// - /// Each secutity requirement in this array is an alternative, only + /// Each security requirement in this array is an alternative, only /// one of which must be met for the request to be authorized. /// /// By contrast, all entries in an individual `SecurityRequirement` diff --git a/Sources/OpenAPIKit30/Operation/DereferencedOperation.swift b/Sources/OpenAPIKit30/Operation/DereferencedOperation.swift index 05ef9dd37..4ecde92c5 100644 --- a/Sources/OpenAPIKit30/Operation/DereferencedOperation.swift +++ b/Sources/OpenAPIKit30/Operation/DereferencedOperation.swift @@ -28,7 +28,7 @@ public struct DereferencedOperation: Equatable { /// If defined, overrides the security requirements in the /// root document `security` array. /// - /// Each secutity requirement in this array is an alternative, only + /// Each security requirement in this array is an alternative, only /// one of which must be met for the request to be authorized. /// /// By contrast, all entries in an individual `DereferencedSecurityRequirement` diff --git a/Sources/OpenAPIKit30/Operation/Operation.swift b/Sources/OpenAPIKit30/Operation/Operation.swift index cea038bab..2c0311fd6 100644 --- a/Sources/OpenAPIKit30/Operation/Operation.swift +++ b/Sources/OpenAPIKit30/Operation/Operation.swift @@ -86,7 +86,7 @@ extension OpenAPI { /// If defined, overrides the security requirements in the /// root `OpenAPI.Document` `security` array. /// - /// Each secutity requirement in this array is an alternative, only + /// Each security requirement in this array is an alternative, only /// one of which must be met for the request to be authorized. /// /// By contrast, all entries in an individual `SecurityRequirement`