Skip to content

Commit

Permalink
Add test for generated server register handlers without operations
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurcro committed Aug 17, 2023
1 parent 2faf804 commit d95b7ee
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,23 @@ final class SnippetBasedReferenceTests: XCTestCase {
)
}

func testServerRegisterHandlers_noOperation() throws {
try self.assertServerRegisterHandlers(
"""
{}
""",
"""
public func registerHandlers(
on transport: any ServerTransport,
serverURL: URL = .defaultOpenAPIServerURL,
configuration: Configuration = .init(),
middlewares: [any ServerMiddleware] = []
) throws {
}
"""
)
}

func testPathWithPathItemReference() throws {
XCTAssertThrowsError(
try self.assertPathsTranslation(
Expand Down

0 comments on commit d95b7ee

Please sign in to comment.