Skip to content

Commit cc4d711

Browse files
authored
feat(openapi): add optional description field to workspace API key schemas (Comfy-Org#13993)
* feat(openapi): add optional description field to workspace API key schemas Add an optional `description` property (type: string) to three workspace API key schemas in openapi.yaml: - Inline request body of createWorkspaceApiKey (POST /api/workspace/api-keys) - WorkspaceApiKey (list/info schema) - WorkspaceApiKeyCreated (creation response schema) The field is not added to any `required` array, making it fully backward-compatible with existing clients. Refs: BE-1005, BE-1004 Co-authored-by: Matt Miller <mattmillerai@users.noreply.github.com> * fix(openapi): mark description nullable in workspace API key response schemas Per CodeRabbit review on PR Comfy-Org#13993: the underlying DB column is nullable varchar (default ''), so the response schemas should permit null to match stored data reality. Without nullable: true the OpenAPI contract would require coercion on the handler side or risk a contract violation. Request schema unchanged — clients shouldn't be sending null on create.
1 parent 626b082 commit cc4d711

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

openapi.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,6 +4160,9 @@ paths:
41604160
name:
41614161
type: string
41624162
description: Display name for the API key
4163+
description:
4164+
type: string
4165+
description: User-provided description for the key
41634166
responses:
41644167
"201":
41654168
description: API key created
@@ -7682,6 +7685,10 @@ components:
76827685
type: string
76837686
name:
76847687
type: string
7688+
description:
7689+
type: string
7690+
nullable: true
7691+
description: User-provided description
76857692
prefix:
76867693
type: string
76877694
description: First few characters of the key for identification
@@ -7708,6 +7715,10 @@ components:
77087715
type: string
77097716
name:
77107717
type: string
7718+
description:
7719+
type: string
7720+
nullable: true
7721+
description: User-provided description
77117722
key:
77127723
type: string
77137724
description: Full API key value (only returned on creation)

0 commit comments

Comments
 (0)