String schema with validation options.
Value parameters
- description
-
Human-readable description shown to the LLM
- enumValues
-
Restricts valid values to this closed set
- maxLength
-
Maximum allowed string length
- minLength
-
Minimum allowed string length
Attributes
- Companion
- object
- Source
- SchemaDefinition.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SchemaDefinition[String]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Serialise this schema to a JSON Schema ujson.Value.
Serialise this schema to a JSON Schema ujson.Value.
Value parameters
- strict
-
When
true, all object properties are treated as required, matching OpenAI strict-mode tool definitions.
Attributes
- Source
- SchemaDefinition.scala
Replace the description shown to the LLM.
Restrict valid values to the given closed enumeration.
Restrict valid values to the given closed enumeration.
Value parameters
- values
-
Allowed string values
Attributes
- Source
- SchemaDefinition.scala
Set or clear the closed enumeration; None lifts the restriction. Duplicates are dropped.
Set or clear the closed enumeration; None lifts the restriction. Duplicates are dropped.
Attributes
- Source
- SchemaDefinition.scala
Add minimum and/or maximum length constraints.
Add minimum and/or maximum length constraints.
Value parameters
- max
-
Optional maximum length (inclusive)
- min
-
Optional minimum length (inclusive)
Attributes
- Source
- SchemaDefinition.scala
Set the maximum allowed string length (inclusive).
Set or clear the maximum allowed string length (inclusive).
Set or clear the maximum allowed string length (inclusive).
Attributes
- Source
- SchemaDefinition.scala
Set the minimum allowed string length (inclusive).
Set or clear the minimum allowed string length (inclusive).
Set or clear the minimum allowed string length (inclusive).
Attributes
- Source
- SchemaDefinition.scala
