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
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Schema
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. 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.

  7. def asOption: Schema[Option[T]]

    Returns an optional version of this schema, with isOptional set to true.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. def default(t: T, raw: Option[Any] = None): Schema[T]
  10. val default: Option[(T, Option[Any])]
  11. def deprecated(d: Boolean): Schema[T]
  12. val deprecated: Boolean
  13. def description(d: String): Schema[T]
  14. val description: Option[String]
  15. def encodedExample(e: Any): Schema[T]
  16. val encodedExample: Option[Any]
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def format(f: String): Schema[T]
  19. val format: Option[String]
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. val isOptional: Boolean
  23. def map[TT](f: (T) => Option[TT])(g: (TT) => T): Schema[TT]
  24. macro def modify[U](path: (T) => U)(modification: (Schema[U]) => Schema[U]): Schema[T]
  25. def modifyUnsafe[U](fields: String*)(modify: (Schema[U]) => Schema[U]): Schema[T]
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def productElementNames: Iterator[String]
    Definition Classes
    Product
  30. val schemaType: SchemaType
  31. def show: String
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def validate(v: Validator[T]): Schema[T]
  34. val validator: Validator[T]
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped