Skip to content

useCase field optional in the APIKey type#58

Merged
eguzki merged 1 commit into
mainfrom
apikey-usecase-optional
May 19, 2026
Merged

useCase field optional in the APIKey type#58
eguzki merged 1 commit into
mainfrom
apikey-usecase-optional

Conversation

@eguzki
Copy link
Copy Markdown
Contributor

@eguzki eguzki commented May 19, 2026

Summary by CodeRabbit

  • Changes
    • The useCase field in API Key specifications is now optional rather than required, allowing API Keys to be created without specifying a use case.

Review Change Stack

Signed-off-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
@eguzki eguzki requested a review from R-Lawton May 19, 2026 13:35
@eguzki eguzki added the enhancement New feature or request label May 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6ed3abc3-0676-4d5d-b299-b50187f4a375

📥 Commits

Reviewing files that changed from the base of the PR and between 66c48cf and 7ac5601.

📒 Files selected for processing (3)
  • api/v1alpha1/apikey_types.go
  • config/crd/bases/devportal.kuadrant.io_apikeys.yaml
  • docs/references/apikey.md
💤 Files with no reviewable changes (1)
  • config/crd/bases/devportal.kuadrant.io_apikeys.yaml

📝 Walkthrough

Walkthrough

The pull request makes the APIKeySpec.UseCase field optional across the API type definition, CustomResourceDefinition schema, and reference documentation. The Go struct field is updated with the omitempty JSON tag and optional marker; the CRD schema is updated to remove useCase from required fields; and the documentation is updated to reflect the optional status.

Changes

APIKeySpec.UseCase Optional Field

Layer / File(s) Summary
Type definition and CRD schema update
api/v1alpha1/apikey_types.go, config/crd/bases/devportal.kuadrant.io_apikeys.yaml
The Go struct field APIKeySpec.UseCase is marked optional with omitempty tag and +optional marker, removing the required validation marker. The CRD schema is synchronised by removing useCase from the required fields list.
Documentation update
docs/references/apikey.md
The APIKeySpec.useCase field reference is updated to show the field is optional (required: No).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A field once required, now free to roam,
Optional choices let users feel at home,
From type to schema, docs align,
Three changes make one purpose shine! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: making the useCase field optional in the APIKey type across all three modified files.
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.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch apikey-usecase-optional

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@R-Lawton R-Lawton left a comment

Choose a reason for hiding this comment

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

lgtm

@eguzki eguzki enabled auto-merge May 19, 2026 13:54
@eguzki eguzki disabled auto-merge May 19, 2026 14:08
@eguzki eguzki merged commit aac5aea into main May 19, 2026
19 checks passed
@eguzki eguzki deleted the apikey-usecase-optional branch May 19, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants