api

http4k / org.http4k.contract.openapi.v3 / OpenApi3ApiRenderer

OpenApi3ApiRenderer

class OpenApi3ApiRenderer<NODE : Any> : ApiRenderer<Api<NODE>, NODE>

Converts a API to OpenApi3 format JSON.

Constructors

Name Summary
<init> Converts a API to OpenApi3 format JSON.OpenApi3ApiRenderer(json: Json<NODE>)

Functions

Name Summary
api fun api(api: Api<NODE>): NODE
toSchema fun toSchema(obj: Any, overrideDefinitionId: String?): JsonSchema<NODE>

Extension Functions

Name Summary
cached Cache the result of the API render, in case it is expensive to calculate.fun <API : Any, NODE : Any> ApiRenderer<API, NODE>.cached(): ApiRenderer<API, NODE>