jscheam/property
Types
Additional properties configuration for object types
pub type AdditionalProperties {
AllowAny
AllowExplicit
Disallow
Schema(Type)
}
Constructors
-
AllowAnyAllow any additional properties (JSON Schema default behavior) This is the default and will omit the additionalProperties field from the schema
-
AllowExplicitExplicitly allow any additional properties (outputs “additionalProperties”: true)
-
DisallowDisallow any additional properties
-
Schema(Type)Additional properties must conform to the specified schema
A property in a JSON Schema object
pub type Property {
Property(
name: String,
property_type: Type,
is_required: Bool,
description: option.Option(String),
constraints: List(Constraint),
)
}
Constructors
-
Property( name: String, property_type: Type, is_required: Bool, description: option.Option(String), constraints: List(Constraint), )
A JSON Schema type
pub type Type {
Integer
String
Boolean
Float
Null
Object(
properties: List(Property),
additional_properties: AdditionalProperties,
)
Array(Type)
Union(List(Type))
}
Constructors
-
Integer -
String -
Boolean -
Float -
Null -
Object( properties: List(Property), additional_properties: AdditionalProperties, ) -
Array(Type) -
Union(List(Type))Union type for multiple allowed types (e.g., [“string”, “null”])