jsonschema: dont export defaultText as default
This commit is contained in:
committed by
hsjobeki
parent
28f907cc85
commit
6808f0a59f
@@ -72,7 +72,8 @@ rec {
|
|||||||
{ }
|
{ }
|
||||||
else if opt ? defaultText then
|
else if opt ? defaultText then
|
||||||
{
|
{
|
||||||
default = "<thunk>";
|
# dont add default to jsonschema. It seems to alter the type
|
||||||
|
# default = "<thunk>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lib.optionalAttrs (opt ? default) {
|
lib.optionalAttrs (opt ? default) {
|
||||||
@@ -93,10 +94,17 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
makeModuleInfo =
|
makeModuleInfo =
|
||||||
{ path }:
|
|
||||||
{
|
{
|
||||||
"$exportedModuleInfo" = {
|
path,
|
||||||
|
defaultText ? null,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
"$exportedModuleInfo" =
|
||||||
|
{
|
||||||
inherit path;
|
inherit path;
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs (defaultText != null) {
|
||||||
|
inherit defaultText;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,6 +180,7 @@ rec {
|
|||||||
};
|
};
|
||||||
exposedModuleInfo = makeModuleInfo {
|
exposedModuleInfo = makeModuleInfo {
|
||||||
path = option.loc;
|
path = option.loc;
|
||||||
|
defaultText = option.defaultText or null;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# either type
|
# either type
|
||||||
|
|||||||
Reference in New Issue
Block a user