RestApi

public protocol RestApi : Endpoint, RouteCollection

A component that is used at the root of each API and can get registered to a Vapor Application by conforming to RouteCollection. It also conforms to Endpoint to remain composable itself.

  • boot(routes:) Extension method

    A default implementation for boot that recurses down the API’s hierarchy.

    Throws

    An error if registration fails.

    Declaration

    Swift

    public func boot(routes: RoutesBuilder) throws

    Parameters

    routes

    The RoutesBuilder containing HTTP route information up to this point.