Endpoint
public protocol Endpoint
A protocol most Corvus components in a hierarchy conform to, so that they may be treated as the same type interchangeably.
-
content
Default implementationThe content of an
Endpoint
, used for components which can harbor other components, e.g.Group
.Default Implementation
An empty default implementation for
content
for components that do not have it.Declaration
Swift
var content: Endpoint { get }
-
register(to:
Default implementation) A method needed to implement registration of an endpoint to the
Router
provided by Vapor, this handles the logic of making certain operations accessible on certain route paths.Default Implementation
A default implementation of
.register()
for components that do not need special behaviour.Declaration
Swift
func register(to routes: RoutesBuilder)
Parameters
routes
The
RoutesBuilder
containing HTTP route information up to this point.