generated,rust-analyzer: Handle objects with defined properties

They are implemented as submodules instead of an attrset of anything
This commit is contained in:
Quentin Boyer 2024-08-11 10:34:07 +02:00
parent f823d01002
commit ad704ddba7
3 changed files with 146 additions and 4 deletions

View file

@ -43,6 +43,7 @@ let
maximum ? null,
items ? null,
anyOf ? null,
properties ? null,
# Not used in the function, but anyOf values contain it
enumDescriptions ? null,
}@property:
@ -96,6 +97,13 @@ let
kind = type;
inherit minimum maximum;
}
else if type == "object" && properties != null then
{
kind = "submodule";
options = lib.mapAttrs (
name: value: mkRustAnalyzerOptionType false "${property_name}.${name}" value
) properties;
}
else if
lib.elem type [
"object"