returning
Add possible responses to this Route.
Add possible response metadata to this Route. A route supports multiple possible responses.
Add a possible response description/reason and status to this Route
Add possible response statuses to this Route with no example.
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.
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.