case class Schema[T](schemaType: SchemaType, isOptional: Boolean = false, description: Option[String] = None, default: Option[(T, Option[Any])] = None, format: Option[String] = None, encodedExample: Option[Any] = None, deprecated: Boolean = false, validator: Validator[T] = Validator.pass[T]) extends Product with Serializable
Describes the type T
: its low-level representation, meta-data and validation rules.
- format
The name of the format of the low-level representation of
T
.
- Annotations
- @implicitNotFound("""Could not find Schema for type ${T}.
Since 0.17.0 automatic derivation requires the following import: `import sttp.tapir.generic.auto._`
You can find more details in the docs: https://tapir.softwaremill.com/en/latest/endpoint/customtypes.html#schema-derivation""")
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Schema
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Schema(schemaType: SchemaType, isOptional: Boolean = false, description: Option[String] = None, default: Option[(T, Option[Any])] = None, format: Option[String] = None, encodedExample: Option[Any] = None, deprecated: Boolean = false, validator: Validator[T] = Validator.pass[T])
- format
The name of the format of the low-level representation of
T
.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def asArray: Schema[Array[T]]
Returns an array version of this schema, with the schema type wrapped in SArray.
Returns an array version of this schema, with the schema type wrapped in SArray. Sets
isOptional
to true as the collection might be empty. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asIterable[C[X] <: Iterable[X]]: Schema[C[T]]
Returns a collection version of this schema, with the schema type wrapped in SArray.
Returns a collection version of this schema, with the schema type wrapped in SArray. Sets
isOptional
to true as the collection might be empty. - def asOption: Schema[Option[T]]
Returns an optional version of this schema, with
isOptional
set to true. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def default(t: T, raw: Option[Any] = None): Schema[T]
- val default: Option[(T, Option[Any])]
- def deprecated(d: Boolean): Schema[T]
- val deprecated: Boolean
- def description(d: String): Schema[T]
- val description: Option[String]
- def encodedExample(e: Any): Schema[T]
- val encodedExample: Option[Any]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def format(f: String): Schema[T]
- val format: Option[String]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isOptional: Boolean
- def map[TT](f: (T) => Option[TT])(g: (TT) => T): Schema[TT]
- macro def modify[U](path: (T) => U)(modification: (Schema[U]) => Schema[U]): Schema[T]
- def modifyUnsafe[U](fields: String*)(modify: (Schema[U]) => Schema[U]): Schema[T]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val schemaType: SchemaType
- def show: String
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def validate(v: Validator[T]): Schema[T]
- val validator: Validator[T]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated