put
inline fun <TParams : Any, TResponse : Any, TRequest : Any> NormalOpenAPIRoute.put(vararg modules: RouteOpenAPIModule, exampleResponse: TResponse? = null, exampleRequest: TRequest? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams, TRequest) -> Unit)(source)
Builds a route to match PUT
requests generating OpenAPI documentation. Route parameters will have the type TParams and response type will have TResponse. The body of the request will be parsed into a TRequest instance. Any of the template types can be specified as Unit if they are not used.
Return
the new created route
Parameters
modules
to add OpenAPI details. See com.papsign.ktor.openapigen.route.info, com.papsign.ktor.openapigen.route.status, com.papsign.ktor.openapigen.route.tags or any other implementation of module
example Response
optional example of TResponse to add to OpenAPI specification
example Request
optional example of TRequest to add to OpenAPI specification
body
a block that received the request parameters builds the response