feat: add hostname management and improve error handling

This commit is contained in:
2025-05-03 22:41:21 +02:00
parent 65846a33c0
commit e62bbf8ca3
5 changed files with 121 additions and 3 deletions

View File

@@ -94,3 +94,43 @@ paths:
description: Connection profile removed successfully
'500':
description: Internal server error
/hostname:
get:
summary: Get system hostname
description: Returns the current system hostname
responses:
'200':
description: Hostname retrieved successfully
content:
text/plain:
schema:
type: string
description: Current hostname
example: "MyHostname"
'500':
description: Internal server error
post:
summary: Set system hostname
description: Sets a new system hostname
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- hostname
properties:
hostname:
type: string
description: New hostname to set
example: "MyHostname"
responses:
'200':
description: Hostname set successfully
'400':
description: Invalid request payload
'500':
description: Internal server error