Package-level declarations

Types

Link copied to clipboard

Describes an object matching any of the given types.

Link copied to clipboard

Describes an array of types.

Link copied to clipboard

Describes an empty type/schema.

Link copied to clipboard
sealed class ExampleDescriptor

Identifier and description of an example

Link copied to clipboard

Describes a type from a kotlin KType

Link copied to clipboard
class RefExampleDescriptor(val name: String, val refName: String) : ExampleDescriptor

Describes a reference to a shared example placed in the components section

Link copied to clipboard
class RefTypeDescriptor(val schemaId: String) : TypeDescriptor

Describes a reference to a schema in the component section.

Link copied to clipboard
class SerialTypeDescriptor(val descriptor: SerialDescriptor) : TypeDescriptor

Describes a type from a kotlinx-serialization SerialDescriptor

Link copied to clipboard
class SwaggerExampleDescriptor(val name: String, val example: Example) : ExampleDescriptor

Describes an example as a swagger Example-object

Link copied to clipboard
class SwaggerTypeDescriptor(val schema: Schema<*>) : TypeDescriptor

Describes a type from a swagger Schema

Link copied to clipboard
sealed interface TypeDescriptor

Describes and identifies types and schemas.

Link copied to clipboard
class ValueExampleDescriptor(val name: String, val value: Any?, val summary: String? = null, val description: String? = null) : ExampleDescriptor

Describes an example as an object.

Functions

Link copied to clipboard
fun anyOf(vararg types: Schema<*>): AnyOfTypeDescriptor
fun anyOf(vararg types: KType): AnyOfTypeDescriptor
@JvmName(name = "anyOfSwagger")
fun anyOf(types: Collection<Schema<*>>): AnyOfTypeDescriptor
@JvmName(name = "anyOfKType")
fun anyOf(types: Collection<KType>): AnyOfTypeDescriptor

Describe any of the given types.

Link copied to clipboard
inline fun <T> array(): ArrayTypeDescriptor
fun array(type: Schema<*>): ArrayTypeDescriptor

Describe an array with the given item type.

Link copied to clipboard

Describe an empty / "any" schema.

Link copied to clipboard
fun ref(schemaId: String): RefTypeDescriptor

Describe a schema referenced by the given id.

Link copied to clipboard
inline fun <T> type(): KTypeDescriptor

Create a schema describing the given type parameter.