diff options
author | John Estabrook <jestabro@vyos.io> | 2023-05-01 11:05:00 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-05-10 22:52:25 -0500 |
commit | bb6b4f97e08178c1cbf67927cd46d8301fb0a05f (patch) | |
tree | a9c179154c3a73130906a3856c755f2302429aa2 /src/reference_tree.mli | |
parent | 782d945950e52a8b48b812b0fad6161e43f7f5b0 (diff) | |
download | vyos1x-config-bb6b4f97e08178c1cbf67927cd46d8301fb0a05f.tar.gz vyos1x-config-bb6b4f97e08178c1cbf67927cd46d8301fb0a05f.zip |
T5194: add render_json
Diffstat (limited to 'src/reference_tree.mli')
-rw-r--r-- | src/reference_tree.mli | 14 |
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 |