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 @@ -20,7 +20,7 @@ using OpenAPI;
*
*/
@service(#{ title: "HyperFleet API" })
@info(#{ version: "1.0.9", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
@info(#{ version: "1.0.10", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
@server("https://hyperfleet.redhat.com", "Production")
@route("/api/hyperfleet/v1")
namespace HyperFleet;
Expand Down
4 changes: 2 additions & 2 deletions schemas/core/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.9
version: 1.0.10
contact:
name: HyperFleet Team
license:
Expand All @@ -16,322 +16,322 @@
tags: []
paths:
/api/hyperfleet/v1/clusters:
get:
operationId: getClusters
summary: List clusters
parameters:
- $ref: '#/components/parameters/SearchParams'
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.order'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/ClusterList'
'400':
description: The server could not understand the request due to invalid syntax.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
security:
- BearerAuth: []

Check warning on line 44 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.

Check warning on line 44 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-description

Operation "description" must be present and non-empty string.
post:
operationId: postCluster
summary: Create cluster
description: |-
Create a new cluster resource.

**Note**: The `status` object in the response is read-only and computed by the service.
It is NOT part of the request body. Initially,
status.conditions will include mandatory "Available", "Ready" and "Reconciled" conditions.
parameters: []
responses:
'201':
description: The request has succeeded and a new resource has been created as a result.
content:
application/json:
schema:
$ref: '#/components/schemas/Cluster'
'400':
description: The server could not understand the request due to invalid syntax.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClusterCreateRequest'
security:
- BearerAuth: []

Check warning on line 77 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.
/api/hyperfleet/v1/clusters/{cluster_id}:
get:
operationId: getClusterById
summary: Get cluster by ID
parameters:
- $ref: '#/components/parameters/SearchParams'
- name: cluster_id
in: path
required: true
schema:
type: string
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Cluster'
'400':
description: The server could not understand the request due to invalid syntax.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
security:
- BearerAuth: []

Check warning on line 105 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.

Check warning on line 105 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-description

Operation "description" must be present and non-empty string.
patch:
operationId: patchClusterById
summary: Patch cluster by ID
description: Patch a specific cluster by ID
parameters:
- name: cluster_id
in: path
required: true
description: Cluster ID
schema:
type: string
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/Cluster'
'400':
description: The server could not understand the request due to invalid syntax.
'404':
description: The server cannot find the requested resource.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClusterPatchRequest'
security:
- BearerAuth: []

Check warning on line 141 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.
delete:
operationId: deleteClusterById
summary: Request cluster deletion
description: |-
Marks the cluster for deletion by setting deleted_time to the current time, cascades to its nodepools.
The cluster remains in the database until it is fully deleted.
Returns the updated cluster with generation incremented.
parameters:
- name: cluster_id
in: path
required: true
schema:
type: string
responses:
'202':
description: The request has been accepted for processing, but processing has not yet completed.
content:
application/json:
schema:
$ref: '#/components/schemas/Cluster'
example:
kind: Cluster
id: 019466a0-8f8e-7abc-9def-0123456789ab
href: https://api.hyperfleet.com/v1/clusters/019466a0-8f8e-7abc-9def-0123456789ab
name: cluster-123
labels:
environment: production
team: platform
spec: {}
generation: 2
status:
conditions:
- type: Ready
status: 'True'
reason: All adapters reported Ready True for the current generation
message: All adapters reported Ready True for the current generation
observed_generation: 2
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Reconciled
status: 'True'
reason: All required adapters reported Available=True or Finalized=True at the current generation
message: All required adapters reported Available=True or Finalized=True at the current generation
observed_generation: 2
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Available
status: 'True'
reason: All adapters reported Available True for the same generation
message: All adapters reported Available True for the same generation
observed_generation: 2
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Adapter1Successful
status: 'True'
reason: This adapter1 is available
message: This adapter1 is available
observed_generation: 2
created_time: '2021-01-01T10:00:00Z'
last_updated_time: '2021-01-01T10:00:00Z'
last_transition_time: '2021-01-01T10:00:00Z'
- type: Adapter2Successful
status: 'True'
reason: This adapter2 is available
message: This adapter2 is available
observed_generation: 2
created_time: '2021-01-01T10:01:00Z'
last_updated_time: '2021-01-01T10:01:00Z'
last_transition_time: '2021-01-01T10:01:00Z'
created_time: '2021-01-01T00:00:00Z'
updated_time: '2021-01-01T10:02:00Z'
deleted_time: '2021-01-01T10:05:00Z'
created_by: user-123@example.com
updated_by: user-123@example.com
deleted_by: user-123@example.com
'400':
description: The server could not understand the request due to invalid syntax.
'404':
description: The server cannot find the requested resource.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
security:
- BearerAuth: []

Check warning on line 231 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.
/api/hyperfleet/v1/clusters/{cluster_id}/nodepools:
get:
operationId: getNodePoolsByClusterId
summary: List all nodepools for cluster
description: Returns the list of all nodepools for a cluster
parameters:
- name: cluster_id
in: path
required: true
description: Cluster ID
schema:
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.order'
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/NodePoolList'
'400':
description: The server could not understand the request due to invalid syntax.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
security:
- BearerAuth: []

Check warning on line 265 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.
post:
operationId: createNodePool
summary: Create nodepool
description: Create a NodePool for a cluster
parameters:
- name: cluster_id
in: path
required: true
description: Cluster ID
schema:
type: string
responses:
'201':
description: The request has succeeded and a new resource has been created as a result.
content:
application/json:
schema:
$ref: '#/components/schemas/NodePoolCreateResponse'
'400':
description: The server could not understand the request due to invalid syntax.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NodePoolCreateRequest'
security:
- BearerAuth: []

Check warning on line 299 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.
/api/hyperfleet/v1/clusters/{cluster_id}/nodepools/{nodepool_id}:
get:
operationId: getNodePoolById
summary: Get nodepool by ID
description: Returns specific nodepool
parameters:
- name: cluster_id
in: path
required: true
description: Cluster ID
schema:
type: string
- name: nodepool_id
in: path
required: true
description: NodePool ID
schema:
type: string
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/NodePool'
'400':
description: The server could not understand the request due to invalid syntax.
default:
description: An unexpected error response.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
security:
- BearerAuth: []

Check warning on line 334 in schemas/core/openapi.yaml

View workflow job for this annotation

GitHub Actions / validate

operation-tags

Operation must have non-empty "tags" array.
delete:
operationId: deleteNodePoolById
summary: Request nodepool deletion
Expand Down Expand Up @@ -692,7 +692,7 @@
/api/hyperfleet/v1/nodepools:
get:
operationId: getNodePools
summary: List all nodepools for cluster
summary: List all nodepools for clusterr
description: Returns the list of all nodepools
parameters:
- $ref: '#/components/parameters/SearchParams'
Expand Down
4 changes: 2 additions & 2 deletions schemas/core/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ info:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0'
title: HyperFleet API
version: 1.0.9
version: 1.0.10
host: hyperfleet.redhat.com
basePath: /
schemes:
Expand Down Expand Up @@ -910,7 +910,7 @@ paths:
- BearerAuth: []
description: Returns the list of all nodepools
operationId: getNodePools
summary: List all nodepools for cluster
summary: List all nodepools for clusterr
definitions:
AdapterCondition:
description: >-
Expand Down
4 changes: 2 additions & 2 deletions schemas/gcp/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.9
version: 1.0.10
contact:
name: HyperFleet Team
license:
Expand Down Expand Up @@ -582,7 +582,7 @@ paths:
/api/hyperfleet/v1/nodepools:
get:
operationId: getNodePools
summary: List all nodepools for cluster
summary: List all nodepools for clusterr
description: Returns the list of all nodepools
parameters:
- $ref: '#/components/parameters/SearchParams'
Expand Down
4 changes: 2 additions & 2 deletions schemas/gcp/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ info:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0'
title: HyperFleet API
version: 1.0.9
version: 1.0.10
host: hyperfleet.redhat.com
basePath: /
schemes:
Expand Down Expand Up @@ -779,7 +779,7 @@ paths:
- BearerAuth: []
description: Returns the list of all nodepools
operationId: getNodePools
summary: List all nodepools for cluster
summary: List all nodepools for clusterr
definitions:
AcceleratorSpec:
properties:
Expand Down
2 changes: 1 addition & 1 deletion services/nodepools.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface NodePools {
*/
@route("/nodepools")
@get
@summary("List all nodepools for cluster")
@summary("List all nodepools for clusterr")
@operationId("getNodePools")
getNodePools(...QueryParams): Body<NodePoolList>
| Error
Expand Down