Merge pull request 'openapi: add strict top-level checking' (#4280) from api-cleanup into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4280
This commit is contained in:
hsjobeki
2025-07-09 15:24:45 +00:00
4 changed files with 31 additions and 5 deletions

View File

@@ -69,7 +69,7 @@ def blk_from_dict(data: dict) -> BlkInfo:
@API.register
def list_block_devices() -> Blockdevices:
def list_system_storage_devices() -> Blockdevices:
"""
List local block devices by running `lsblk`.

View File

@@ -88,7 +88,7 @@ def parse_avahi_output(output: str) -> DNSInfo:
@API.register
def list_mdns_services() -> DNSInfo:
def list_system_services_mdns() -> DNSInfo:
"""List mDNS/DNS-SD services on the local network.
Returns:
DNSInfo: A dictionary containing discovered mDNS/DNS-SD services.
@@ -111,7 +111,7 @@ def list_mdns_services() -> DNSInfo:
def mdns_command(args: argparse.Namespace) -> None:
dns_info = list_mdns_services()
dns_info = list_system_services_mdns()
for name, info in dns_info.services.items():
print(f"Hostname: {name} - ip: {info.ip}")

View File

@@ -33,7 +33,7 @@ def delete_task(task_id: str) -> None:
@API.register
def run_blocking_task(somearg: str) -> str:
def run_task_blocking(somearg: str) -> str:
"""A long blocking task that simulates a long-running operation."""
time.sleep(1)
ctx = get_async_ctx()