HYPERFLEET-1467 - feat: Add the read-only tenancy map to the Resource spec - #67
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe API version advances to Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. 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 `@shared/models/resource/model.tsp`:
- Around line 52-53: Update the tenancy property in the Resource model with
`@visibility`(Lifecycle.Read) so generated Resource schemas mark it readOnly while
create and patch schemas continue omitting it. Add a schema test verifying
tenancy is response-only.
🪄 Autofix
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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: b2c12b78-d7da-4f72-b591-63aa0bb0c726
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (6)
CHANGELOG.mdmain.tsppackage.jsonschemas/core/openapi.yamlshared/models/resource/example_resource.tspshared/models/resource/model.tsp
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
Adds @visibility(Lifecycle.Read) to Resource.tenancy so the emitted OpenAPI schema explicitly flags it as readOnly, reinforcing that it is server-populated and not client-writable. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rh-amarin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
42a7434
into
openshift-hyperfleet:main
Summary
Add the read-only tenancy map to the Resource spec
Test Plan
make test-allpassesmake lintpassesmake test-helm(if applicable)