api

http4k / org.http4k.contract / ContractRoute

ContractRoute

class ContractRoute : HttpHandler

Properties

Name Summary
meta val meta: RouteMeta
method val method: Method
nonBodyParams val nonBodyParams: List<Meta>
spec val spec: ContractRouteSpec
tags val tags: List<Tag>

Functions

Name Summary
describeFor fun describeFor(contractRoot: PathSegments): String
invoke ContractRoutes are chiefly designed to operate within a contract {} block and not directly as an HttpHandler, but this function exists to enable the testing of the ContractRoute logic outside of a wider contract context. This means that certain behaviour is defaulted - chiefly the generation of NOT_FOUND and BAD_REQUEST responses.fun invoke(request: Request): Response
newRequest fun newRequest(baseUri: Uri): Request
toString fun toString(): String

Extension Functions

Name Summary
operationId fun ContractRoute.operationId(contractRoot: PathSegments): String