Skip to content

HYPERFLEET-1143 - chore: Remove kind from list schemas#6

Open
tirthct wants to merge 2 commits into
openshift-hyperfleet:mainfrom
tirthct:hyperfleet-1143
Open

HYPERFLEET-1143 - chore: Remove kind from list schemas#6
tirthct wants to merge 2 commits into
openshift-hyperfleet:mainfrom
tirthct:hyperfleet-1143

Conversation

@tirthct
Copy link
Copy Markdown

@tirthct tirthct commented Jun 4, 2026

Description:

Summary

  • Update core spec dependency to latest main and regenerate schemas
  • kind property is removed from all list response schemas (ClusterList, NodePoolList, AdapterStatusList, ResourceList, WIFConfigList) — inherited from core spec HYPERFLEET-1143
  • Version bump to 1.0.22

Context

The template's npm dependency on the core spec (hyperfleet-api-spec#main) was stale — pinned to commit 78199f6 (HYPERFLEET-1103 repo split). This refresh picks up 4 core releases:

Core version Ticket Shared model changes
v1.0.18 HYPERFLEET-1103 Restructured into core/ and shared/ directories
v1.0.19 No shared model changes
v1.0.20 HYPERFLEET-993 Error models renamed to RFC 9457 ProblemDetails, pagination constraints
v1.0.21 HYPERFLEET-1143 kind removed from list response schemas

The large schema diff is primarily from HYPERFLEET-993 (error models rewrite) and HYPERFLEET-1143 (kind removal).

Changes

  • main.tsp — version bump 1.0.21 → 1.0.22
  • CHANGELOG.md — added 1.0.22 entry
  • package-lock.json — refreshed core spec dependency
  • schemas/template/openapi.yaml — regenerated
  • schemas/template/swagger.yaml — regenerated

Test plan

  • TypeSpec compiles without errors
  • spectral lint passes (1 pre-existing warning)
  • kind absent from all list schemas
  • kind still present on individual resource schemas

@openshift-ci openshift-ci Bot requested a review from crizzo71 June 4, 2026 18:40
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 4, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign aredenba-rh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot requested a review from rafabene June 4, 2026 18:40
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 6355b2ea-98c4-4df4-8723-20a22449c168

📥 Commits

Reviewing files that changed from the base of the PR and between fc3cba3 and 0bbcfb5.

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

📝 Walkthrough

Summary by CodeRabbit

  • Breaking Changes

    • Removed the kind field from list responses (pagination-only shape now used).
    • API error payloads changed/standardized (previous generic error format replaced).
  • Improvements

    • Error responses now follow RFC9457-style ProblemDetails with richer, status-specific details.
    • Pagination query parameters now enforce a minimum value of 1.

Walkthrough

This release updates HyperFleet API specification to version 1.0.22. It standardizes error responses across all endpoints to use RFC 9457 ProblemDetails-based schemas instead of a generic Error type, introducing status-specific schemas (BadRequestDetails, NotFoundDetails, ConflictDetails, UnauthorizedDetails) for clarity. List response schemas are updated to remove the kind field and use pagination-only shapes with page, size, total, and items. Query parameter validation is tightened with minimum: 1 constraints on pagination parameters. All changes are mirrored in both OpenAPI and Swagger spec formats.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removal of the kind property from list schemas, matching the core changeset.
Description check ✅ Passed The description clearly relates to the changeset, providing context for the core spec refresh and the kind removal across all list schemas.
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.
Sec-02: Secrets In Log Output ✅ Passed Repository contains no Go code (0 .go files). Check is for Go logging statements; not applicable to TypeSpec/YAML specification project.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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 `@schemas/template/openapi.yaml`:
- Around line 1969-1989: The Spectral lint flags ForbiddenDetails and
ForbiddenResponse as unused; update the upstream TypeSpec definitions so these
schemas are actually referenced by 403 responses or remove them from the core
models and regenerate the OpenAPI: either wire
ForbiddenDetails/ForbiddenResponse into the appropriate service operation
responses in the .tsp files (attach ForbiddenResponse as the 403 response for
relevant operations) or delete the corresponding model declarations in the
TypeSpec sources and run the generator to produce a spec without these unused
components, then re-run CI.
🪄 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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 263b9b9e-cbea-4bd4-bb59-4c6a8a782968

📥 Commits

Reviewing files that changed from the base of the PR and between ceadd4e and fc3cba3.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • CHANGELOG.md
  • main.tsp
  • schemas/template/openapi.yaml
  • schemas/template/swagger.yaml

Comment thread schemas/template/openapi.yaml
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.

1 participant