Builder

Builder for constructing a MediaType instance.

Report a problem

Constructors

Link copied to clipboard
constructor(schemaInference: JsonSchemaInference)

Properties

Link copied to clipboard

Encoding information for properties.

Link copied to clipboard

Examples of the media type.

Link copied to clipboard

Specification-extensions for this media type.

Link copied to clipboard

The schema defining the content.

Functions

Link copied to clipboard
open override fun buildSchema(type: KType): JsonSchema

Builds a JsonSchema for the given type.

Link copied to clipboard
fun encoding(propertyName: String, encoding: Encoding)

Adds encoding information for a property.

Link copied to clipboard
fun example(name: String, example: ExampleObject)

Adds an example for this media type.

Link copied to clipboard
inline fun <T : Any> extension(name: String, value: T)

Adds an extension.

Link copied to clipboard

Generates a JSON Schema representation for the given type T.