Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typealias RequestError to avoid KituraContracts import #1267

Merged
merged 4 commits into from May 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/Kitura/CodableRouter.swift
Expand Up @@ -19,6 +19,11 @@ import LoggerAPI
import KituraNet
import KituraContracts

/// Bridge [RequestError](https://ibm-swift.github.io/KituraContracts/Structs/RequestError.html)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this dummy class was only necessary because the file otherwise contains only a typealias. In this case I dropped the typealias into the existing CodableRouter.swift since I could argue it belongs there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK as long as Jazzy is generating the typealias OK then we're fine :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it generates fine.

/// from [KituraContracts](https://ibm-swift.github.io/KituraContracts) so that you only need to import
/// `Kitura` to access it.
public typealias RequestError = KituraContracts.RequestError

// Codable router

extension Router {
Expand Down