SCoproduct

sttp.tapir.SchemaType$.SCoproduct
case class SCoproduct[T](subtypes: List[Schema[_]], discriminator: Option[SDiscriminator])(subtypeSchema: T => Option[SchemaWithValue[_]]) extends SchemaType[T]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait SchemaType[T]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addDiscriminatorField[D](discriminatorName: FieldName, discriminatorSchema: Schema[D], discriminatorMapping: Map[String, SRef[_]]): SCoproduct[T]

Value parameters

discriminatorSchema

Schema used when adding the discriminator as a field to a child product schema.

Attributes

override def as[TT]: SchemaType[TT]

Adapt this schema to type TT. Only the meta-data is retained. Run-time functionality, which allows traversing collection elements, product fields, or coproduct subtypes is lost.

Adapt this schema to type TT. Only the meta-data is retained. Run-time functionality, which allows traversing collection elements, product fields, or coproduct subtypes is lost.

Attributes

Definition Classes
override def contramap[TT](g: TT => T): SchemaType[TT]

Attributes

Definition Classes
override def show: String

Attributes

Definition Classes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val subtypeSchema: T => Option[SchemaWithValue[_]]