HttpRouteContract
data class HttpRouteContract(val routeId: String, val method: String, val path: String, val handlerKey: String, val summary: String = "", val description: String = "", val accept: List<String> = listOf("application/json"), val parameters: List<HttpParameter> = emptyList(), val requestBody: HttpRequestBody? = null, val responses: List<HttpResponse> = emptyList(), val tags: List<HttpTag> = emptyList(), val handlerMetadata: HttpRouteHandlerMetadata = HttpRouteHandlerMetadata.None)
One HTTP route: what the router dispatches by and what the OpenAPI document describes. It is pure data: building it generates no schema and registers no component. Schemas (HttpSchema.TypeRef) and components (HttpComponent) are references the renderer resolves when the document is rendered.
The path item of path takes the summary and description of the first route on it.
Constructors
Link copied to clipboard
constructor(routeId: String, method: String, path: String, handlerKey: String, summary: String = "", description: String = "", accept: List<String> = listOf("application/json"), parameters: List<HttpParameter> = emptyList(), requestBody: HttpRequestBody? = null, responses: List<HttpResponse> = emptyList(), tags: List<HttpTag> = emptyList(), handlerMetadata: HttpRouteHandlerMetadata = HttpRouteHandlerMetadata.None)