SchemaOf

org.llm4s.schema.SchemaOf
See theSchemaOf companion trait
@Experimental
object SchemaOf

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SchemaOf.type

Members list

Value members

Concrete methods

def apply[A](using schemaOf: SchemaOf[A]): SchemaOf[A]

The instance of A in scope.

The instance of A in scope.

Attributes

inline def derived[A](using m: Of[A]): SchemaOf[A]

Derives the schema of a case class, an enum or a sealed hierarchy of singletons: derives SchemaOf.

Derives the schema of a case class, an enum or a sealed hierarchy of singletons: derives SchemaOf.

Attributes

def string[A](description: String): SchemaOf[A]

A type that is written as a JSON string, such as a date or an identifier whose ReadWriter you define yourself: its schema is a plain string.

A type that is written as a JSON string, such as a date or an identifier whose ReadWriter you define yourself: its schema is a plain string.

Value parameters

description

what the model sees for a field of this type that has no description of its own, and for the type itself when it is the schema on its own

Attributes

def stringEnum[A](description: String, values: Seq[String]): SchemaOf[A]

A type that is written as one of a fixed set of strings.

A type that is written as one of a fixed set of strings.

Value parameters

description

as for string

values

the strings the model may answer with

Attributes

Givens

Givens

given given_SchemaOf_BigDecimal: SchemaOf[BigDecimal]
given list[A](using item: SchemaOf[A]): SchemaOf[List[A]]
given option[A](using inner: SchemaOf[A], notNested: NotGiven[A <:< Option[_]]): SchemaOf[Option[A]]
given seq[A](using item: SchemaOf[A]): SchemaOf[Seq[A]]
given set[A](using item: SchemaOf[A]): SchemaOf[Set[A]]
given vector[A](using item: SchemaOf[A]): SchemaOf[Vector[A]]