Corvus

Documentation MIT License Continuous Integration Swift 5.2

Corvus is the first truly declarative server-side framework for Swift. It provides a declarative, composable syntax which makes it easy to get APIs up and running. It is based heavily on the existing work from Vapor.

Example

Below is an example of a full-featured API that manages Bank Accounts and Transactions belonging to certain users. It also showcases the ease of using authentication and setting authorization rules for specific routes.

<div class="highlight highlight-source-swift position-relative" data-snippet-clipboard-copy-content="let xpenseApi = Api("api") {
User("users")

Login("login")

BearerAuthGroup {
AccountsEndpoint()
TransactionsEndpoint()
}
}
“>

let xpenseApi = Api("api") {
    User<CorvusUser>("users")
    
    Login<CorvusToken>("login")
    
    BearerAuthGroup<CorvusToken> {
        AccountsEndpoint()
        TransactionsEndpoint()
    }
}