bobzhang/typify/schema does not have a README file

    SchemaError

    pub(all) suberror SchemaError {
    SchemaError(message~ : String, path~ : String)
    } derive(Eq,
    Debug
    )

    A schema decoding error with serde's message and a JSON pointer to the offending value.
    impl Show for SchemaError

    ArrayValidation

    pub(all) struct ArrayValidation {
    items : SingleOrVec[Schema]?
    additional_items : Schema?
    max_items : UInt?
    min_items : UInt?
    unique_items : Bool?
    contains : Schema?
    } derive(Eq,
    Debug
    )

    ArrayValidation::default

    InstanceType

    pub(all) enum InstanceType {
    Null
    Boolean
    Object
    Array
    Number
    String
    Integer
    } derive(Compare, Eq, Hash,
    Debug
    )

    The type of a JSON value (type keyword). The declaration order matters: it is schemars' derived Ord.

    InstanceType::name

    fn InstanceType::name(self : InstanceType) -> String

    The JSON name of an instance type.

    Metadata

    pub(all) struct Metadata {
    id : String?
    title : String?
    description : String?
    default :
    Value
    ?
    deprecated : Bool
    read_only : Bool
    write_only : Bool
    examples : Array[
    Value
    ]
    } derive(Eq,
    Debug
    )

    Annotations that do not affect validation.

    Metadata::default

    fn Metadata::default() -> Metadata

    NumberValidation

    pub(all) struct NumberValidation {
    multiple_of : Double?
    maximum : Double?
    exclusive_maximum : Double?
    minimum : Double?
    exclusive_minimum : Double?
    } derive(Eq,
    Debug
    )

    NumberValidation::default

    ObjectValidation

    pub(all) struct ObjectValidation {
    max_properties : UInt?
    min_properties : UInt?
    required :
    StrSet

    properties :
    StrMap
    [Schema]
    pattern_properties :
    StrMap
    [Schema]
    additional_properties : Schema?
    property_names : Schema?
    } derive(Eq,
    Debug
    )

    ObjectValidation::default

    RootSchema

    pub(all) struct RootSchema {
    meta_schema : String?
    schema : SchemaObject
    definitions :
    StrMap
    [Schema]
    } derive(Eq,
    Debug
    )

    The root of a schema document.

    RootSchema::from_json_str

    fn RootSchema::from_json_str(text : StringView) -> RootSchema raise

    Parse and decode a root schema document from JSON text.

    RootSchema::from_value

    Decode a root schema document from a JSON value.

    RootSchema::to_value

    Serialize to a JSON value.

    Schema

    pub(all) enum Schema {
    Bool(Bool)
    Object(SchemaObject)
    } derive(Eq,
    Debug
    )

    A JSON Schema: either a boolean schema or a schema object.

    Schema::into_object

    fn Schema::into_object(self : Schema) -> SchemaObject

    schemars Schema::into_object: true becomes {}, false becomes {"not": {}}.

    Schema::is_ref

    fn Schema::is_ref(self : Schema) -> Bool

    Schema::new_ref

    fn Schema::new_ref(reference : String) -> Schema

    Schema::to_value

    Serialize to a JSON value.

    SchemaObject

    pub(all) struct SchemaObject {
    metadata : Metadata?
    instance_type : SingleOrVec[InstanceType]?
    format : String?
    enum_values : Array[
    Value
    ]?
    const_value :
    Value
    ?
    subschemas : SubschemaValidation?
    number : NumberValidation?
    string : StringValidation?
    array : ArrayValidation?
    object : ObjectValidation?
    reference : String?
    extensions :
    StrMap
    [
    Value
    ]
    } derive(Eq,
    Debug
    )

    A schema object. Each validation group is None when it equals its default, exactly as schemars' skip_if_default deserializes it.

    SchemaObject::default

    fn SchemaObject::default() -> SchemaObject

    SchemaObject::has_type

    fn SchemaObject::has_type(self : SchemaObject, ty : InstanceType) -> Bool

    schemars has_type: true when type is absent or contains ty.

    SchemaObject::is_ref

    fn SchemaObject::is_ref(self : SchemaObject) -> Bool

    SchemaObject::new_ref

    fn SchemaObject::new_ref(reference : String) -> SchemaObject

    A schema object holding only a $ref.

    SchemaObject::to_value

    Serialize to a JSON value.

    SingleOrVec

    pub(all) enum SingleOrVec[T] {
    Single(T)
    Vec(Array[T])
    } derive(Eq,
    Debug
    )

    A single value or an array of values (schemars SingleOrVec).

    SingleOrVec::contains

    fn[T : Eq] SingleOrVec::contains(self : SingleOrVec[T], x : T) -> Bool

    StringValidation

    pub(all) struct StringValidation {
    max_length : UInt?
    min_length : UInt?
    pattern : String?
    } derive(Eq,
    Debug
    )

    StringValidation::default

    SubschemaValidation

    pub(all) struct SubschemaValidation {
    all_of : Array[Schema]?
    any_of : Array[Schema]?
    one_of : Array[Schema]?
    not : Schema?
    if_schema : Schema?
    then_schema : Schema?
    else_schema : Schema?
    } derive(Eq,
    Debug
    )

    SubschemaValidation::default

    decode_schema

    fn decode_schema(v :
    Value
    , path? : String) -> Schema raise SchemaError

    Decode an untagged Schema: a boolean or a schema object.

    decode_schema_object

    Decode a schema object from the entries of a JSON object.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io