SchemaValueProvider

fun interface SchemaValueProvider

Provides example values for OpenAPI schemas.

Implementations should check whether they support the given schema and return an appropriate value, or null when not applicable.

Providers are composed in a chain where the first non-null result wins. Providers should be deterministic and side-effect free.

Inheritors

Functions

Link copied to clipboard
abstract fun provide(schema: Schema<*>, variationIndex: Int): Any?

Attempts to provide an example value for the given schema.