feat(classgen): convert only certain attributes

This commit is contained in:
Johannes Kirschbauer
2025-03-29 14:22:34 +01:00
parent 16644309b4
commit 12b88cd19b
6 changed files with 39 additions and 19 deletions

View File

@@ -31,6 +31,6 @@ Service = dict[str, Any]
class Inventory(TypedDict):
machines: NotRequired[dict[str, Machine]]
meta: NotRequired[Meta]
modules: NotRequired[dict[str, int | bool | None | str | dict[str, Any] | float | list[Any]]]
modules: NotRequired[dict[str, Any]]
services: NotRequired[dict[str, Service]]
tags: NotRequired[dict[str, list[str]]]
tags: NotRequired[dict[str, Any]]

View File

@@ -5,4 +5,4 @@ set -euo pipefail
jsonSchema=$(nix build .#schemas.inventory-schema-abstract --print-out-paths)/schema.json
SCRIPT_DIR=$(dirname "$0")
cd "$SCRIPT_DIR"
nix run .#classgen -- "$jsonSchema" "../../../clan-cli/clan_cli/inventory/classes.py" --stop-at "Service"
nix run .#classgen -- "$jsonSchema" "../../../clan-cli/clan_cli/inventory/classes.py"