From acf1c0b87ae6da3f59a3d0453cd8a9eef0b801eb Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 14 Sep 2023 10:37:16 +0200 Subject: [PATCH] lib jsonschema: add path --- lib/jsonschema/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/jsonschema/default.nix b/lib/jsonschema/default.nix index 26c399e..90a8fb2 100644 --- a/lib/jsonschema/default.nix +++ b/lib/jsonschema/default.nix @@ -7,6 +7,7 @@ let float = "number"; int = "integer"; str = "string"; + path = "string"; # TODO add prober path checks }; # remove _module attribute from options @@ -103,6 +104,13 @@ rec { type = "string"; } + # parse string + else if option.type.name == "path" + # return jsonschema property definition for path + then default // description // { + type = "string"; + } + # parse enum else if option.type.name == "enum" # return jsonschema property definition for enum