package ppx_deriving_jsonschema
Jsonschema generator for ppx_deriving
Install
Dune Dependency
Authors
Maintainers
Sources
ppx_deriving_jsonschema-0.0.1.tbz
sha256=53ef084d01e8b21b495a0fa068a11acd0bc3b435028d302396660f6ee69685a6
sha512=d09890057505e8ab6b5a997717d524a514666b467cfe40f37a29a3189056bf32527cd66827c65dc847eeefba36b04e1143ec320080848df20f8adf01e748d8a3
doc/src/ppx_deriving_jsonschema.runtime/ppx_deriving_jsonschema_runtime.ml.html
Source file ppx_deriving_jsonschema_runtime.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
let schema_version = "https://json-schema.org/draft/2020-12/schema" let json_schema ?id ?title ?description ?definitions types = match types with | `Assoc types -> let metadata = List.filter_map (fun x -> x) [ Some ("$schema", `String schema_version); (match id with | None -> None | Some id -> Some ("$id", `String id)); (match title with | None -> None | Some title -> Some ("title", `String title)); (match description with | None -> None | Some description -> Some ("description", `String description)); (match definitions with | None -> None | Some defs -> Some ("$defs", `Assoc defs)); ] in `Assoc (metadata @ types)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>