Jargon::Property
One node of a parsed schema: a single option/field/positional, or the root
object. Holds its type, validation constraints, CLI hints (short, env),
nested properties/items, and any consumer-defined x- extensions.
Constructors
from_json(name : String, json : JSON::Any, required_fields : Array(String) = [] of String) : Property
Build a Property from a JSON Schema node. name is the field's key (or
"root"); required_fields is the enclosing object's required list, used
to set this field's required?.
new(name : String, type : Type, description : String | Nil = nil, required : Bool = false, default : JSON::Any | Nil = nil, enum_values : Array(JSON::Any) | Nil = nil, properties : Hash(String, Property) | Nil = nil, items : Property | Nil = nil, ref : String | Nil = nil, short : String | Nil = nil, env : String | Nil = nil, minimum : Float64 | Nil = nil, maximum : Float64 | Nil = nil, exclusive_minimum : Float64 | Nil = nil, exclusive_maximum : Float64 | Nil = nil, multiple_of : Float64 | Nil = nil, min_length : Int32 | Nil = nil, max_length : Int32 | Nil = nil, min_items : Int32 | Nil = nil, max_items : Int32 | Nil = nil, unique_items : Bool = false, pattern : Regex | Nil = nil, const : JSON::Any | Nil = nil, format : String | Nil = nil, additional_properties : Bool | Nil = nil, service : Bool = false, extensions : Hash(String, JSON::Any) = {} of String => JSON::Any)
SourceInstance methods
additional_properties
Sourceconst
Sourcedefault
Sourcedescription
Sourceenum_values
Sourceenv
Sourceexclusive_maximum
Sourceexclusive_minimum
Sourceextensions
Sourceformat
Sourceitems
Sourcemax_items
Sourcemax_length
Sourcemaximum
Sourcemin_items
Sourcemin_length
Sourceminimum
Sourcemultiple_of
Sourcename
Sourcepattern
Sourceproperties
Sourceref
Sourcerequired?
Sourceservice?
Sourceshort
Sourcetype
Sourceunique_items?
Source