HttpSchema

sealed interface HttpSchema

The schema of a parameter, header or content. A contract never holds a generated schema: TypeRef names a type whose schema the renderer generates, and Raw holds a static schema that needs no generation.

Inheritors

Types

Link copied to clipboard
data class Array(val item: HttpSchema) : HttpSchema
Link copied to clipboard
data object Integer : HttpSchema
Link copied to clipboard
data object Object : HttpSchema
Link copied to clipboard
data class Raw(val schema: Schema<*>) : HttpSchema

A static schema that does not depend on schema generation, such as an untyped aggregation row.

Link copied to clipboard
data object String : HttpSchema
Link copied to clipboard
data class TypeRef(val type: Type, val typeArguments: List<HttpSchema.TypeRef> = emptyList()) : HttpSchema

The schema generated for type, parameterized by typeArguments, themselves type references, so nested generics such as PagedList<MaterializedSnapshot<S>> need no type resolution while the contract is built.