The JSON schema of a type A
Convenient infix operations
The JSON schema of a record type (case class) A
Convenient infix operations
A JSON schema containing the name of the type A
.
A JSON schema containing the name of the type A
.
Tagged schemas are useful to describe sum types (sealed traits).
A JSON schema for sequences
A JSON schema for type BigDecimal
A JSON schema for type Boolean
The JSON schema of a coproduct made of the given alternative tagged records
A JSON schema for type Double
The JSON schema of a record with a single field name
of type A
A JSON schema for type Int
Transforms the type of the JSON schema
Transforms the type of the JSON schema
Transforms the type of the JSON schema
A JSON schema for type Long
The JSON schema of a record with a single optional field name
of type A
A JSON schema for type String
Tags a schema for type A
with the given tag name
The JSON schema of a record merging the fields of the two given records
An algebra interface for describing algebraic data types. Such descriptions can be interpreted to produce a JSON schema of the data type, a JSON encoder, a JSON decoder, etc.
A description contains the fields of a case class and their type, and the constructor names of a sealed trait.
For instance, consider the following record type:
Its description is the following:
The description says that the record type has two fields, the first one has type
String
and is named “name”, and the second one has typeInt
and name “age”.To describe sum types you have to explicitly “tag” each alternative: