get

inline fun <TParams : Any, TResponse : Any> NormalOpenAPIRoute.get(vararg modules: RouteOpenAPIModule, example: TResponse? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams) -> Unit)(source)

Builds a route to match GET requests generating OpenAPI documentation. Get parameters will have the type TParams and response type will have TResponse. Any of the template types can be specified as Unit if they are not used.

Return

the new created route

Parameters

example

an example of TResponse to add to OpenAPI specification

body

a block that received the request parameters builds the response