chore: remove unused moduleSchemas and related API endpoint for legacy modules

We didn't reach the state where we would display these schemas in the
UI.
We might need to wire this up in a similar way for the newer
clan.services
This commit is contained in:
Johannes Kirschbauer
2025-04-27 13:14:09 +02:00
parent 06e2fcf9fa
commit fbd291ba11
3 changed files with 0 additions and 29 deletions

View File

@@ -174,28 +174,6 @@ def get_modules(base_path: str) -> dict[str, str]:
return modules
@API.register
def get_module_interface(base_path: str, module_name: str) -> dict[str, Any]:
"""
Check if a module exists and returns the interface schema
Returns an error if the module does not exist or has an incorrect interface
"""
cmd = nix_eval([f"{base_path}#clanInternals.moduleSchemas.{module_name}", "--json"])
try:
proc = run_no_stdout(cmd)
res = proc.stdout.strip()
except ClanCmdError as e:
msg = "clanInternals might not have moduleSchemas attributes"
raise ClanError(
msg,
location=f"list_modules {base_path}",
description="Evaluation failed on clanInternals.moduleSchemas attribute",
) from e
modules_schema: dict[str, Any] = json.loads(res)
return modules_schema
@API.register
def list_modules(base_path: str) -> dict[str, ModuleInfo]:
"""