Skip to content

feat(openapi): add optional description field to workspace API key schemas#13993

Merged
mattmillerai merged 3 commits into
masterfrom
cursor/add-description-to-workspace-api-key-schemas-275d
May 19, 2026
Merged

feat(openapi): add optional description field to workspace API key schemas#13993
mattmillerai merged 3 commits into
masterfrom
cursor/add-description-to-workspace-api-key-schemas-275d

Conversation

@mattmillerai
Copy link
Copy Markdown
Contributor

@mattmillerai mattmillerai commented May 19, 2026

Summary

Adds an optional description property (type: string, nullable) to three workspace API key schemas in openapi.yaml. This is a pure schema change — no implementation code is modified.

Changes

Three schemas now include an optional description field:

  1. Inline request body of createWorkspaceApiKey (POST /api/workspace/api-keys) — allows clients to send a description when creating a key
  2. WorkspaceApiKey — surfaces the description in list/info responses (nullable to match storage)
  3. WorkspaceApiKeyCreated — surfaces the description in the creation response (nullable to match storage)

Why

The workspace_api_keys.description column 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

  • All additions are optional — no required: arrays were modified
  • No new tags, schemas, or operations added
  • No reformatting of surrounding YAML
  • Spectral lint passes with 0 errors

…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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12ccf047-74d8-44ad-8aa9-499259f69f75

📥 Commits

Reviewing files that changed from the base of the PR and between b10bf33 and 5203187.

📒 Files selected for processing (1)
  • openapi.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • openapi.yaml

📝 Walkthrough

Walkthrough

Adds a nullable description string field to API key operations: the POST /api/workspace/api-keys request body now accepts an optional description, and the WorkspaceApiKey and WorkspaceApiKeyCreated schemas were extended to include a nullable description field.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding an optional description field to workspace API key schemas.
Description check ✅ Passed The description clearly explains what was changed, why it was changed, and what constraints were satisfied, all directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d0328b4 and e76aaf7.

📒 Files selected for processing (1)
  • openapi.yaml

Comment thread openapi.yaml
mattmillerai added a commit that referenced this pull request May 19, 2026
… 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.
@mattmillerai mattmillerai force-pushed the cursor/add-description-to-workspace-api-key-schemas-275d branch from b10bf33 to 5203187 Compare May 19, 2026 21:35
@mattmillerai mattmillerai merged commit cc4d711 into master May 19, 2026
17 checks passed
@mattmillerai mattmillerai deleted the cursor/add-description-to-workspace-api-key-schemas-275d branch May 19, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants