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
|
||||
{
|
||||
default = "<thunk>";
|
||||
# dont add default to jsonschema. It seems to alter the type
|
||||
# default = "<thunk>";
|
||||
}
|
||||
else
|
||||
lib.optionalAttrs (opt ? default) {
|
||||
@@ -93,10 +94,17 @@ rec {
|
||||
};
|
||||
|
||||
makeModuleInfo =
|
||||
{ path }:
|
||||
{
|
||||
"$exportedModuleInfo" = {
|
||||
path,
|
||||
defaultText ? null,
|
||||
}:
|
||||
{
|
||||
"$exportedModuleInfo" =
|
||||
{
|
||||
inherit path;
|
||||
}
|
||||
// lib.optionalAttrs (defaultText != null) {
|
||||
inherit defaultText;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -172,6 +180,7 @@ rec {
|
||||
};
|
||||
exposedModuleInfo = makeModuleInfo {
|
||||
path = option.loc;
|
||||
defaultText = option.defaultText or null;
|
||||
};
|
||||
in
|
||||
# either type
|
||||
|
||||
Reference in New Issue
Block a user