@@ -22,18 +22,15 @@ final class GitHubAPICampatibilityTests: XCTestCase {
22
22
23
23
override func setUp( ) {
24
24
/*
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.
31
28
*/
32
29
if githubAPI == nil {
33
30
githubAPI = Result {
34
31
try YAMLDecoder ( ) . decode (
35
32
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 " ) !)
37
34
)
38
35
}
39
36
}
@@ -69,8 +66,8 @@ final class GitHubAPICampatibilityTests: XCTestCase {
69
66
// contact name is Support
70
67
XCTAssertEqual ( apiDoc. info. contact? . name, " Support " )
71
68
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 " ) !)
74
71
75
72
// no contact email is provided
76
73
XCTAssert ( apiDoc. info. contact? . email? . isEmpty ?? true )
@@ -149,6 +146,6 @@ final class GitHubAPICampatibilityTests: XCTestCase {
149
146
let resolvedDoc = try apiDoc. locallyDereferenced ( ) . resolved ( )
150
147
151
148
XCTAssertEqual ( resolvedDoc. routes. count, apiDoc. paths. count)
152
- XCTAssertEqual ( resolvedDoc. endpoints. count, 550 )
149
+ XCTAssertEqual ( resolvedDoc. endpoints. count, 664 )
153
150
}
154
151
}
0 commit comments