returning

@JvmName(name = "returningResponse")
fun returning(vararg descriptionToResponse: Pair<String, Response>)

Add possible responses to this Route.


@JvmName(name = "returningResponseMeta")
fun returning(vararg responseMetas: HttpMessageMeta<Response>)

Add possible response metadata to this Route. A route supports multiple possible responses.


@JvmName(name = "returningStatus")
fun returning(vararg statusesToDescriptions: Pair<Status, String>)

Add a possible response description/reason and status to this Route


@JvmName(name = "returningStatus")
fun returning(vararg statuses: Status)

Add possible response statuses to this Route with no example.


@JvmName(name = "returningStatus")
fun <T> returning(status: Status, body: Pair<BiDiBodyLens<T>, T>, description: String? = null, definitionId: String? = null, schemaPrefix: String? = null)

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.


@JvmName(name = "returningStatusNegotiated")
fun <T : Any> returning(status: Status, negotiated: Pair<AutoContentNegotiator<T>, T>, description: String? = null, definitionId: String? = null, schemaPrefix: String? = null)

Add all negotiated responses, with samples. It is also possible to pass in the definitionId for this response body which will override the naturally generated one.