Skip to content

Commit 4ca96ed

Browse files
committed
Merge branch 'swift-5_4' into remove-fine-json-requirement
2 parents 17e3c1a + 9da1445 commit 4ca96ed

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- swift:5.3-focal
2626
- swift:5.3-centos8
2727
- swift:5.3-amazonlinux2
28+
- swiftlang/swift:nightly-5.4-focal
2829
container: ${{ matrix.image }}
2930
steps:
3031
- name: Checkout code

Tests/OpenAPIKitCompatibilitySuite/GitHubAPITests.swift

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,15 @@ final class GitHubAPICampatibilityTests: XCTestCase {
2222

2323
override func setUp() {
2424
/*
25-
NOTE: As of GitHub's OpenAPI documentation v 2.22, they started to nest
26-
their schema components in a bit of an unusual way. not clear to me that
27-
the thing they are doing is disallowed by the spec, but definitely weird.
28-
29-
At any rate, it fails here for now so I will pin this to version 2.21 and
30-
revisit later.
25+
NOTE: As of 2/17/2021 the latest released version of GitHub's API documentation
26+
does not pass but the latest commit does; I will pin this test to that
27+
commit for now.
3128
*/
3229
if githubAPI == nil {
3330
githubAPI = Result {
3431
try YAMLDecoder().decode(
3532
OpenAPI.Document.self,
36-
from: String(contentsOf: URL(string: "https://raw.githubusercontent.com/github/rest-api-description/v1.0.0-rc.1/descriptions/ghes-2.21/ghes-2.21.yaml")!)
33+
from: String(contentsOf: URL(string: "https://raw.githubusercontent.com/github/rest-api-description/e4f28959fbc6c9fc4eea823b495061dded87e84d/descriptions/ghes-3.0/ghes-3.0.yaml")!)
3734
)
3835
}
3936
}
@@ -69,8 +66,8 @@ final class GitHubAPICampatibilityTests: XCTestCase {
6966
// contact name is Support
7067
XCTAssertEqual(apiDoc.info.contact?.name, "Support")
7168

72-
// contact URL was parsed as https://support.github.com
73-
XCTAssertEqual(apiDoc.info.contact?.url, URL(string: "https://support.github.com")!)
69+
// contact URL was parsed as https://support.github.com/contact
70+
XCTAssertEqual(apiDoc.info.contact?.url, URL(string: "https://support.github.com/contact")!)
7471

7572
// no contact email is provided
7673
XCTAssert(apiDoc.info.contact?.email?.isEmpty ?? true)
@@ -149,6 +146,6 @@ final class GitHubAPICampatibilityTests: XCTestCase {
149146
let resolvedDoc = try apiDoc.locallyDereferenced().resolved()
150147

151148
XCTAssertEqual(resolvedDoc.routes.count, apiDoc.paths.count)
152-
XCTAssertEqual(resolvedDoc.endpoints.count, 550)
149+
XCTAssertEqual(resolvedDoc.endpoints.count, 664)
153150
}
154151
}

0 commit comments

Comments
 (0)