fix(api): 服务器显示名称限 64 个可见字符,拒绝换行、控制符和不可见格式符

This commit is contained in:
Lemon-miaow committed 2026-09-27 13:30:28 +08:00
1 parent b8da4e2318
commit 67a7e27f8d
19 files changed
+197 -20

No files matched your search

+11 -5
View File
@@ -1106,18 +1106,21 @@ paths:
properties:
name: { type: string }
subdomain: { type: string }
display_name: { type: string }
displayName:
type: string
maxLength: 64
description: Trimmed; at most 64 characters, all visible ones or spaces (400 bad_display_name otherwise).
image: { type: string }
memory: { type: string }
storage: { type: string }
autostart_policy: { type: string }
autostartPolicy: { type: string }
resources:
type: object
properties:
cpu: { type: string }
cpu_request: { type: string }
cpuRequest: { type: string }
memory: { type: string }
memory_request: { type: string }
memoryRequest: { type: string }
responses:
'201':
description: Created; starts Stopped.
@@ -6090,7 +6093,10 @@ paths:
properties:
displayName:
type: string
description: Trimmed. An empty name clears it, and the server goes by its name again.
maxLength: 64
description: >-
Trimmed. An empty name clears it, and the server goes by its name again. At
most 64 characters, all visible ones or spaces (400 bad_display_name otherwise).
autostartPolicy: { type: string }
image:
type: string