http4k / org.http4k.contract / RouteMetaDsl
class RouteMetaDsl
Name | Summary |
---|---|
consumes | val consumes: Appendable < ContentType > |
cookies | val cookies: Appendable < Lens < Request , *>> |
description | var description: String ? |
headers | val headers: Appendable < Lens < Request , *>> |
operationId | var operationId: String ? |
preFlightExtraction | var preFlightExtraction: PreFlightExtraction ? |
produces | val produces: Appendable < ContentType > |
queries | val queries: Appendable < Lens < Request , *>> |
security | var security: Security ? |
summary | var summary: String |
tags | val tags: Appendable < Tag > |
Name | Summary |
---|---|
markAsDeprecated | fun markAsDeprecated(): Unit |
receiving | Add an example request (using a Lens and a value) to this Route. It is also possible to pass in the definitionId for this request body which will override the naturally generated one.fun <T> receiving(body: Pair < BiDiBodyLens <T>, T>, definitionId: String ? = null): Unit Add request metadata to this Route. A route only supports a single possible request. fun receiving(requestMeta: HttpMessageMeta < Request >): Unit Set the input body type for this request WITHOUT an example. Hence the content-type will be registered but no example schema will be generated. fun <T> receiving(bodyLens: BiDiBodyLens <T>): Unit |
returning | Add possible responses to this Route.fun returning(vararg descriptionToResponse: Pair < String , Response >): Unit Add possible response metadata to this Route. A route supports multiple possible responses. fun returning(vararg responseMetas: HttpMessageMeta < Response >): Unit Add a possible response description/reason and status to this Route fun returning(vararg statusesToDescriptions: Pair < Status , String >): Unit Add possible response statuses to this Route with no example. fun returning(vararg statuses: Status ): Unit Add an example response (using a Lens and a value) to this Route. It is also possible to pass in the definitionId for this response body which will override the naturally generated one. fun <T> returning(status: Status , body: Pair < BiDiBodyLens <T>, T>, description: String ? = null, definitionId: String ? = null): Unit |