case class Schema[T](schemaType: SchemaType[T], name: Option[SName] = None, 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 SchemaMacros[T] with 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()
Linear Supertypes
Serializable, Product, Equals, SchemaMacros[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Schema
  2. Serializable
  3. Product
  4. Equals
  5. SchemaMacros
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Schema(schemaType: SchemaType[T], name: Option[SName] = None, 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 applyValidation(t: T): List[ValidationError[_]]

    Apply defined validation rules to the given value.

  5. def as[TT]: Schema[TT]

    Adapt this schema to type TT.

    Adapt this schema to type TT. Only the meta-data is retained, except for default values and the validator (however, product field/subtypes validators are retained). Run-time functionality: - traversing collection elements, product fields, or coproduct subtypes - validating an instance of type TT the top-level type is lost.

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

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

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

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

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

    Add a validator to this schema.

    Add a validator to this schema. If the validator contains a named enum validator, the name is set as the schema's name.

  40. val validator: Validator[T]
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  43. 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 SchemaMacros[T]

Inherited from AnyRef

Inherited from Any

Ungrouped