OpenApi3ApiRenderer

class OpenApi3ApiRenderer<NODE : Any>(json: Json<NODE>, refLocationPrefix: String = "components/schemas", jsonToJsonSchema: JsonSchemaCreator<NODE, NODE> = JsonToJsonSchema(json, refLocationPrefix)) : ApiRenderer<Api<NODE>, NODE>

Converts a API to OpenApi3 format JSON, using non-reflective JSON marshalling - this is the limited version

If you are using Jackson, you probably want to use ApiRenderer.Auto()!

Constructors

Link copied to clipboard
constructor(json: Json<NODE>, refLocationPrefix: String = "components/schemas", jsonToJsonSchema: JsonSchemaCreator<NODE, NODE> = JsonToJsonSchema(json, refLocationPrefix))

Functions

Link copied to clipboard
open override fun api(api: Api<NODE>): NODE
Link copied to clipboard

Cache the result of the API render, in case it is expensive to calculate.

Link copied to clipboard
open override fun toSchema(obj: Any, overrideDefinitionId: String?, refModelNamePrefix: String?): JsonSchema<NODE>