summaryrefslogtreecommitdiff
path: root/src/reference_tree.mli
diff options
context:
space:
mode:
Diffstat (limited to 'src/reference_tree.mli')
-rw-r--r--src/reference_tree.mli14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/reference_tree.mli b/src/reference_tree.mli
index 92f4582..baa2694 100644
--- a/src/reference_tree.mli
+++ b/src/reference_tree.mli
@@ -1,4 +1,8 @@
-type node_type = Leaf | Tag | Other
+type node_type =
+ | Leaf [@name "leaf"]
+ | Tag [@name "tag"]
+ | Other [@name "other"]
+ [@@deriving yojson]
type value_constraint =
| Regex of string [@name "regex"]
@@ -18,14 +22,14 @@ type ref_node_data = {
keep_order: bool;
hidden: bool;
secret: bool;
-}
+} [@@deriving yojson]
+
+type t = ref_node_data Vytree.t [@@deriving yojson]
exception Bad_interface_definition of string
exception Validation_error of string
-type t = ref_node_data Vytree.t
-
val default_data : ref_node_data
val default : t
@@ -53,3 +57,5 @@ val get_help_string : t -> string list -> string
val get_value_help : t -> string list -> (string * string) list
val get_completion_data : t -> string list -> (node_type * bool * string) list
+
+val render_json : t -> string