NormalOpenAPIRoute

class NormalOpenAPIRoute(route: Route, provider: CachingModuleProvider = CachingModuleProvider()) : OpenAPIRoute<NormalOpenAPIRoute> (source)

Constructors

Link copied to clipboard
constructor(route: Route, provider: CachingModuleProvider = CachingModuleProvider())

Properties

Link copied to clipboard
val OpenAPIRoute<*>.application: Application
Link copied to clipboard
val ktorRoute: Route
Link copied to clipboard

Functions

Link copied to clipboard
open override fun child(route: Route): NormalOpenAPIRoute
Link copied to clipboard
inline fun <TParams : Any, TResponse : Any> NormalOpenAPIRoute.delete(vararg modules: RouteOpenAPIModule, example: TResponse? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams) -> Unit)

Builds a route to match DELETE requests generating OpenAPI documentation. Route 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.

Link copied to clipboard
inline fun OpenAPIRoute<*>.exitAPI(crossinline fn: Route.() -> Unit)
Link copied to clipboard
inline fun <TParams : Any, TResponse : Any> NormalOpenAPIRoute.get(vararg modules: RouteOpenAPIModule, example: TResponse? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams) -> Unit)

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.

Link copied to clipboard
fun <R : Any> getAcceptMap(type: KType): List<Pair<ContentType, List<SelectedSerializer>>>
Link copied to clipboard
fun List<SelectedParser>.getBodyParser(contentType: ContentType): BodyParser
Link copied to clipboard
fun <B : Any> getContentTypesMap(type: KType): List<Pair<ContentType, List<SelectedParser>>>
Link copied to clipboard
Link copied to clipboard
fun <P : Any, R : Any, B : Any> handle(paramsType: KType, responseType: KType, bodyType: KType, pass: suspend OpenAPIRoute<*>.(pipeline: RoutingContext, responder: Responder, P, B) -> Unit)
Link copied to clipboard
inline fun <TParams : Any, TResponse : Any> NormalOpenAPIRoute.handle(exampleResponse: TResponse? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams) -> Unit)
inline fun <TParams : Any, TResponse : Any, TRequest : Any> NormalOpenAPIRoute.handle(exampleResponse: TResponse? = null, exampleRequest: TRequest? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams, TRequest) -> Unit)
Link copied to clipboard
inline fun <TParams : Any, TResponse : Any> NormalOpenAPIRoute.head(vararg modules: RouteOpenAPIModule, example: TResponse? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams) -> Unit)

Builds a route to match HEAD requests generating OpenAPI documentation. Route 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.

Link copied to clipboard
inline fun <T : OpenAPIModule> mapContentTypes(noinline fn: T.() -> List<ContentType>): List<Pair<ContentType, List<T>>>
Link copied to clipboard
inline fun <TParams : Any, TResponse : Any, TRequest : Any> NormalOpenAPIRoute.patch(vararg modules: RouteOpenAPIModule, exampleResponse: TResponse? = null, exampleRequest: TRequest? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams, TRequest) -> Unit)

Builds a route to match PATCH 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.

Link copied to clipboard
inline fun <TParams : Any, TResponse : Any, TRequest : Any> NormalOpenAPIRoute.post(vararg modules: RouteOpenAPIModule, exampleResponse: TResponse? = null, exampleRequest: TRequest? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams, TRequest) -> Unit)

Builds a route to match POST 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.

Link copied to clipboard
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)

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.

Link copied to clipboard
inline fun <TParams : Any, TResponse : Any> NormalOpenAPIRoute.route(method: HttpMethod, modules: Array<out RouteOpenAPIModule>, exampleResponse: TResponse? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams) -> Unit)

inline fun <TParams : Any, TResponse : Any, TRequest : Any> NormalOpenAPIRoute.route(method: HttpMethod, modules: Array<out RouteOpenAPIModule>, exampleResponse: TResponse? = null, exampleRequest: TRequest? = null, noinline body: suspend OpenAPIPipelineResponseContext<TResponse>.(TParams, TRequest) -> Unit)

Builds a route to match requests with the specified method 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.