From 45b9f44ea42226f69287889135ea3f9d97d3e67e Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Thu, 10 Sep 2026 14:18:56 -0500 Subject: [PATCH 1/2] backport support of OAS 3.2.1 to version 5 --- Sources/OpenAPIKit/Document/Document.swift | 2 +- Tests/OpenAPIKitTests/Document/DocumentTests.swift | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Sources/OpenAPIKit/Document/Document.swift b/Sources/OpenAPIKit/Document/Document.swift index 94e1d9100..ec1233416 100644 --- a/Sources/OpenAPIKit/Document/Document.swift +++ b/Sources/OpenAPIKit/Document/Document.swift @@ -496,7 +496,7 @@ extension OpenAPI.Document { // change to the enumeration, bump the upper limit here to e.g. 2 or 3 // or 6: if minorVersion == "2" { - guard patchVersion > 0 && patchVersion <= 0 else { + guard patchVersion > 0 && patchVersion <= 1 else { return nil } self = .v3_2_x(x: patchVersion) diff --git a/Tests/OpenAPIKitTests/Document/DocumentTests.swift b/Tests/OpenAPIKitTests/Document/DocumentTests.swift index 147590f74..2f4883184 100644 --- a/Tests/OpenAPIKitTests/Document/DocumentTests.swift +++ b/Tests/OpenAPIKitTests/Document/DocumentTests.swift @@ -80,12 +80,18 @@ final class DocumentTests: XCTestCase { let t8 = OpenAPI.Document.Version(rawValue: "3.1.2") XCTAssertEqual(t8, .v3_1_2) + let t9 = OpenAPI.Document.Version(rawValue: "3.2.0") + XCTAssertEqual(t9, .v3_2_0) + + let t10 = OpenAPI.Document.Version(rawValue: "3.2.1") + XCTAssertEqual(t10, .v3_2_x(x: 1)) + // not a known version: - let t9 = OpenAPI.Document.Version(rawValue: "3.1.8") - XCTAssertNil(t9) + let ta = OpenAPI.Document.Version(rawValue: "3.1.8") + XCTAssertNil(ta) - let t10 = OpenAPI.Document.Version(rawValue: "3.2.8") - XCTAssertNil(t10) + let tb = OpenAPI.Document.Version(rawValue: "3.2.8") + XCTAssertNil(tb) } func test_compareOASVersions() { From 25968db2cce4814cc3b5fdf05ec51b7c33c8f01f Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Thu, 10 Sep 2026 14:33:23 -0500 Subject: [PATCH 2/2] update CI test matrix --- .github/workflows/tests.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7fb41677c..45af42a37 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,18 +13,17 @@ jobs: fail-fast: false matrix: image: - - swift:5.10-focal - swift:5.10-jammy - - swift:6.0-focal - swift:6.0-jammy - swift:6.0-noble - - swift:6.1-focal - swift:6.1-jammy - swift:6.1-noble - swift:6.2-jammy - swift:6.2-noble - - swiftlang/swift:nightly-focal -# - swiftlang/swift:nightly-jammy + - swift:6.3-jammy + - swift:6.3-noble + - swiftlang/swift:nightly-jammy + - swiftlang/swift:nightly-noble container: ${{ matrix.image }} steps: - name: Checkout code