http4k / org.http4k.contract / RouteMetaDsl / returning
@JvmName("returningResponse") fun returning(vararg descriptionToResponse:
Pair
<
String
,
Response
>):
Unit
Add possible responses to this Route.
@JvmName("returningResponseMeta") fun returning(vararg responseMetas:
HttpMessageMeta
<
Response
>):
Unit
Add possible response metadata to this Route. A route supports multiple possible responses.
@JvmName("returningStatus") fun returning(vararg statusesToDescriptions:
Pair
<
Status
,
String
>):
Unit
Add a possible response description/reason and status to this Route
@JvmName("returningStatus") fun returning(vararg statuses:
Status
):
Unit
Add possible response statuses to this Route with no example.
@JvmName("returningStatus") fun <T> returning(status:
Status
, body:
Pair
<
BiDiBodyLens
<T>, T>, description:
String
? = null, definitionId:
String
? = null):
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.