feat(openapi): add optional description field to workspace API key schemas#13993
Conversation
…hemas 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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a nullable 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openapi.yaml`:
- Around line 7688-7690: The response schema defines the property named
"description" as type: string but the source column is nullable; update the
OpenAPI schema entries for the "description" property (both occurrences
referenced) to allow nulls by adding nullable: true (or make the type accept
null) so the API contract matches stored data and can legally return null for
description.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2bb96194-1955-415d-b9e2-8d9d60feb1b5
📒 Files selected for processing (1)
openapi.yaml
… schemas Per CodeRabbit review on PR #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. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… schemas Per CodeRabbit review on PR #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.
b10bf33 to
5203187
Compare
Summary
Adds an optional
descriptionproperty (type: string, nullable) to three workspace API key schemas inopenapi.yaml. This is a pure schema change — no implementation code is modified.Changes
Three schemas now include an optional
descriptionfield:createWorkspaceApiKey(POST/api/workspace/api-keys) — allows clients to send a description when creating a keyWorkspaceApiKey— surfaces the description in list/info responses (nullable to match storage)WorkspaceApiKeyCreated— surfaces the description in the creation response (nullable to match storage)Why
The
workspace_api_keys.descriptioncolumn already exists in the runtime database (nullable varchar, default''). Adding this field to the OSS-owned API contract unblocks downstream consumers that want to preserve a description column with zero UX regression.Constraints satisfied
required:arrays were modified