feat(api,cli): strict UUID validation for app-id and workspace-id (#37212)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Xiyuan Chenandautofix-ci[bot] authored and GitHub committed 2026-06-09 07:35:18 +00:00
1 parent 686e643632
commit 1502a57381
19 files changed
+99 -92

No files matched your search

+1 -4
View File
@@ -32,13 +32,10 @@ export class AppsClient {
})
}
async describe(appId: string, workspaceId: string, fields?: readonly string[]): Promise<AppDescribeResponse> {
async describe(appId: string, fields?: readonly string[]): Promise<AppDescribeResponse> {
return this.orpc.apps.byAppId.describe.get({
params: { app_id: appId },
query: {
workspace_id: workspaceId,
// The backend parses a comma-separated string (validator splits on ','); the contract
// types `fields` as a string accordingly, so join here rather than send an array.
fields: fields !== undefined && fields.length > 0 ? fields.join(',') : undefined,
},
})