Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using OpenAPI;
*/
@service(#{ title: "HyperFleet API" })
@info(#{
version: "1.0.24",
version: "1.0.25",
contact: #{
name: "HyperFleet Team",
url: "https://github.com/openshift-hyperfleet",
Expand Down
13 changes: 10 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "./build-schema.sh"
},
"dependencies": {
"hyperfleet": "github:openshift-hyperfleet/hyperfleet-api-spec#main"
"hyperfleet": "github:openshift-hyperfleet/hyperfleet-api-spec#v1.0.24"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== package.json ==\n'
cat -n package.json | sed -n '1,40p'

printf '\n== search for pageSize / size in spec files ==\n'
rg -n '"pageSize"|pageSize|orderBy|size' . --glob '!node_modules' --glob '!schemas/**' --glob '!tsp-output-template/**' || true

printf '\n== main.tsp / changelog references ==\n'
rg -n '`@info`|v1\.0\.24|v1\.0\.25|pageSize|size' main.tsp CHANGELOG.md schemas/template/openapi.yaml 2>/dev/null || true

Repository: openshift-hyperfleet/hyperfleet-api-spec-template

Length of output: 2863


Hold this core spec bump until downstream list clients switch to size (package.json:10). hyperfleet-api and hyperfleet-sentinel still build/parse pageSize, while this repo now publishes size in the generated contract. Shipping v1.0.24 here creates a breaking pagination mismatch for list endpoints.

🤖 Prompt for 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.

In `@package.json` at line 10, The hyperfleet core spec dependency has been bumped
to a contract version that switches list pagination from pageSize to size, but
downstream clients in this repo still build and parse pageSize. Revert or defer
the package.json hyperfleet version change until the generated contract and all
list clients are updated together, and keep the dependency pinned to the last
compatible spec version referenced by the hyperfleet package entry.

Sources: Path instructions, Linked repositories

},
"devDependencies": {
"@stoplight/spectral-cli": "6.15.1",
Expand Down
49 changes: 22 additions & 27 deletions schemas/template/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: HyperFleet API
version: 1.0.24
version: 1.0.25
contact:
name: HyperFleet Team
url: https://github.com/openshift-hyperfleet
Expand Down Expand Up @@ -29,8 +29,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SearchParams'
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.size'
- $ref: '#/components/parameters/QueryParams.order'
Comment on lines 31 to 33

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

pageSizesize is an uncoordinated contract break.

The linked API implementation and clients are not on this contract yet: openshift-hyperfleet/hyperfleet-api/pkg/services/types.go still prefers pageSize, its integration tests still call QueryParamsPageSize(...), and openshift-hyperfleet/hyperfleet-sentinel/internal/client/client.go still emits PageSize. Publishing only size here will desync generated clients and the running service. Keep a deprecated pageSize alias in the shared QueryParams source until the API, Sentinel, and generated clients land together, then regenerate schemas/template/*.
As per coding guidelines, "DO NOT modify generated files in schemas/ or tsp-output-template/ directly." As per path instructions, "Validate changes against HyperFleet architecture standards from the linked architecture repository."

Also applies to: 240-242, 463-465, 781-783, 1122-1124, 1160-1163, 1378-1387

🤖 Prompt for 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.

In `@schemas/template/openapi.yaml` around lines 31 - 33, The OpenAPI QueryParams
contract is being changed from pageSize to size before the rest of the stack is
ready, which will break generated clients and the live service. Update the
shared QueryParams source to keep pageSize as a deprecated alias alongside size,
and align the API implementation, integration tests, and Sentinel client
references (QueryParamsPageSize, PageSize) before regenerating schemas/template
and related generated artifacts. Do not edit generated files directly; make the
contract change in the source definitions that feed generation so all consumers
stay in sync.

Sources: Coding guidelines, Path instructions, Linked repositories

responses:
'200':
Expand Down Expand Up @@ -239,8 +238,7 @@ paths:
type: string
- $ref: '#/components/parameters/SearchParams'
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.size'
- $ref: '#/components/parameters/QueryParams.order'
responses:
'200':
Expand Down Expand Up @@ -463,8 +461,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SearchParams'
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.size'
- $ref: '#/components/parameters/QueryParams.order'
responses:
'200':
Expand Down Expand Up @@ -782,8 +779,7 @@ paths:
type: string
- $ref: '#/components/parameters/SearchParams'
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.size'
- $ref: '#/components/parameters/QueryParams.order'
responses:
'200':
Expand Down Expand Up @@ -1124,8 +1120,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SearchParams'
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.size'
- $ref: '#/components/parameters/QueryParams.order'
responses:
'200':
Expand Down Expand Up @@ -1164,8 +1159,7 @@ paths:
parameters:
- $ref: '#/components/parameters/SearchParams'
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.size'
- $ref: '#/components/parameters/QueryParams.order'
responses:
'200':
Expand Down Expand Up @@ -1367,13 +1361,6 @@ components:
name: order
in: query
required: false
schema:
$ref: '#/components/schemas/OrderDirection'
explode: false
QueryParams.orderBy:
name: orderBy
in: query
required: false
schema:
type: string
default: created_time
Expand All @@ -1388,8 +1375,8 @@ components:
minimum: 1
default: 1
explode: false
QueryParams.pageSize:
name: pageSize
QueryParams.size:
name: size
in: query
required: false
schema:
Expand Down Expand Up @@ -1473,6 +1460,7 @@ components:
Channel:
type: object
required:
- kind
- name
- spec
- created_time
Expand Down Expand Up @@ -1553,6 +1541,7 @@ components:
ChannelCreateRequest:
type: object
required:
- kind
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- name
- spec
properties:
Expand Down Expand Up @@ -1638,6 +1627,7 @@ components:
Cluster:
type: object
required:
- kind
- name
- spec
- created_time
Expand Down Expand Up @@ -1770,6 +1760,7 @@ components:
ClusterCreateRequest:
type: object
required:
- kind
- name
- spec
properties:
Expand Down Expand Up @@ -2001,6 +1992,7 @@ components:
NodePool:
type: object
required:
- kind
- name
- spec
- created_time
Expand Down Expand Up @@ -2140,6 +2132,7 @@ components:
NodePoolCreateRequest:
type: object
required:
- kind
- name
- spec
properties:
Expand Down Expand Up @@ -2194,6 +2187,7 @@ components:
NodePoolCreateResponse:
type: object
required:
- kind
- name
- spec
- created_time
Expand Down Expand Up @@ -2407,6 +2401,8 @@ components:
trace_id: deadbeef12345678
ObjectReference:
type: object
required:
- kind
properties:
id:
type: string
Expand All @@ -2417,11 +2413,6 @@ components:
href:
type: string
description: Resource URI
OrderDirection:
type: string
enum:
- asc
- desc
ProblemDetails:
type: object
required:
Expand Down Expand Up @@ -2607,6 +2598,7 @@ components:
Version:
type: object
required:
- kind
- name
- spec
- created_time
Expand Down Expand Up @@ -2694,6 +2686,7 @@ components:
VersionCreateRequest:
type: object
required:
- kind
- name
- spec
properties:
Expand Down Expand Up @@ -2793,6 +2786,7 @@ components:
WifConfig:
type: object
required:
- kind
- name
- spec
- created_time
Expand Down Expand Up @@ -2873,6 +2867,7 @@ components:
WifConfigCreateRequest:
type: object
required:
- kind
- name
- spec
properties:
Expand Down
Loading