balli.json-schema¶
Schema -> JSON Schema export (Malli's malli.json-schema). transform takes a raw schema form or a balli schema object (plus optional opts {:registry r}, ignored when given a schema object -- its baked-in registry wins) and returns a STRING-KEYED Basilisp map shaped like a JSON Schema document (draft 2020-12: :tuple uses prefixItems + items false). Per-node result (mirrors Malli's -json-schema-walker): (or (:json-schema props) ; whole-node override, verbatim (merge {title/description/default} ; passthrough props (generated type mapping) (unlifted :json-schema/* props))) ; :json-schema/foo -> \"foo\", wins Keywords render as name strings (\"ns/name\" when qualified) -- map keys, :enum values, := consts, :default values. Refs emit {\"$ref\" \"#/definitions/basilisp.json/write-str, which accepts it directly).
transform¶
Kind: defn
Export schema s (raw form or schema object) as a JSON Schema: a string-keyed Basilisp map. opts supports {:registry r} for raw forms (ignored when s is a schema object). When any refs were reached, the top-level map carries \