diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ae28b..0cbfa1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.0.26] - 2026-07-09 + +### Added + +- 204 No Content response to PUT cluster, nodepool, and resource statuses endpoints (HYPERFLEET-1154) + +## [1.0.25] - 2026-06-23 + +### Changed + +- Remove `@format("email")` constraint from `created_by`, `updated_by`, and `deleted_by` audit fields (HYPERFLEET-1278) + ## [1.0.24] - 2026-06-24 ### Changed @@ -228,7 +240,9 @@ First official stable release of the HyperFleet API specification. - Interactive API documentation -[Unreleased]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec/compare/v1.0.23...HEAD +[Unreleased]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec/compare/v1.0.26...HEAD +[1.0.26]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec/compare/v1.0.25...v1.0.26 +[1.0.25]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec/compare/v1.0.24...v1.0.25 [1.0.23]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec/compare/v1.0.22...v1.0.23 [1.0.22]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec/compare/v1.0.21...v1.0.22 [1.0.21]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec/compare/v1.0.20...v1.0.21 diff --git a/core/services/resources-internal.tsp b/core/services/resources-internal.tsp index 2f5a85e..2ded2ce 100644 --- a/core/services/resources-internal.tsp +++ b/core/services/resources-internal.tsp @@ -139,12 +139,13 @@ interface ResourceStatuses { @put @summary("Adapter creates or updates resource status") @operationId("putResourceStatuses") - @doc("Adapters call this endpoint to report status for a resource after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name).") + @doc("Adapters call this endpoint to report status for a resource after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). Returns 400 Bad Request when mandatory conditions (Available, Applied, Health) are missing or Available has an invalid status value. Returns 204 No Content when the report is silently discarded (e.g., stale generation, duplicate observed time, or subsequent Unknown Available status).") putResourceStatuses( @path resource_id: string, @body body: AdapterStatusCreateRequest, ): | (CreatedResponse & AdapterStatus) + | { @statusCode statusCode: 204; } | Error | BadRequestResponse | UnauthorizedResponse diff --git a/core/services/statuses-internal.tsp b/core/services/statuses-internal.tsp index b4b6968..289cac5 100644 --- a/core/services/statuses-internal.tsp +++ b/core/services/statuses-internal.tsp @@ -38,7 +38,7 @@ interface ClusterStatuses { @put @summary("Adapter creates or updates cluster status") @operationId("putClusterStatuses") - @doc("Adapters call this endpoint to report the status for a cluster after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified cluster status.") + @doc("Adapters call this endpoint to report the status for a cluster after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified cluster status. Returns 400 Bad Request when mandatory conditions (Available, Applied, Health) are missing or Available has an invalid status value. Returns 204 No Content when the report is silently discarded (e.g., stale generation, duplicate observed time, or subsequent Unknown Available status).") putClusterStatuses( /** * Cluster ID @@ -48,6 +48,7 @@ interface ClusterStatuses { @body body: AdapterStatusCreateRequest, ): | (CreatedResponse & AdapterStatus) + | { @statusCode statusCode: 204; } | Error | BadRequestResponse | UnauthorizedResponse @@ -82,7 +83,7 @@ interface NodePoolStatuses { @put @summary("Adapter creates or updates nodepool status") @operationId("putNodePoolStatuses") - @doc("Adapters call this endpoint to report the status for a nodepool after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified nodepool status.") + @doc("Adapters call this endpoint to report the status for a nodepool after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified nodepool status. Returns 400 Bad Request when mandatory conditions (Available, Applied, Health) are missing or Available has an invalid status value. Returns 204 No Content when the report is silently discarded (e.g., stale generation, duplicate observed time, or subsequent Unknown Available status).") putNodePoolStatuses( /** * Cluster ID @@ -97,6 +98,7 @@ interface NodePoolStatuses { @body body: AdapterStatusCreateRequest, ): | (CreatedResponse & AdapterStatus) + | { @statusCode statusCode: 204; } | Error | BadRequestResponse | UnauthorizedResponse diff --git a/main.tsp b/main.tsp index c9eec40..383961c 100644 --- a/main.tsp +++ b/main.tsp @@ -30,7 +30,7 @@ using OpenAPI; */ @service(#{ title: "HyperFleet API" }) @info(#{ - version: "1.0.25", + version: "1.0.26", contact: #{ name: "HyperFleet Team", url: "https://github.com/openshift-hyperfleet", diff --git a/package-lock.json b/package-lock.json index e3b7d33..9e3c3f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hyperfleet", - "version": "1.0.24", + "version": "1.0.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hyperfleet", - "version": "1.0.24", + "version": "1.0.26", "devDependencies": { "@stoplight/spectral-cli": "6.15.1", "@typespec/compiler": "^1.6.0", @@ -1188,7 +1188,6 @@ "integrity": "sha512-4vuWtoepc4rYJ81K+P7xn2ByXIRhBM40rfzAGnpagNuGSVHuKEC6lqJqs3ePvhCpnxiYAC8XWpaOi+BEDzyhnQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "~7.29.0", "@inquirer/prompts": "^8.3.0", @@ -1367,7 +1366,6 @@ "integrity": "sha512-/DOkN2+MUZyLdmqYmSMZDjxikJTOuNxikTeOwG2fVOibnu8e6S1jzPAuN/mn6YyQBKeBCItMPmUOXIj61Wy8Bg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=20.0.0" }, @@ -1387,7 +1385,6 @@ "integrity": "sha512-xUQrHExKBh0XSP4cn+HcondDXjHJM5HCq2Xfy9tB1QflsFh5uP1JJt1+67g73VmHlhZVSUDcoFrnU95pfjyubg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=20.0.0" }, @@ -1466,7 +1463,6 @@ "integrity": "sha512-5bha4t64xA85zLY8VGm/6jNd2kwPHzjPq/dlCUjtgGfGXv2R6Ow/YIukqhqZnwnIgNAIlZ7nguekRMRx+2oO2w==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=20.0.0" }, @@ -1493,7 +1489,6 @@ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -1986,31 +1981,6 @@ "dev": true, "license": "MIT" }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/env-paths": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-4.0.0.tgz", @@ -3276,7 +3246,6 @@ "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 10.16.0" } @@ -3815,7 +3784,6 @@ "integrity": "sha512-cIFJOD1DESzpjOBl763Kp1AH7UE/0fcdHe6rZXUdQ9c50uvgigvW97u3IcSeBwOkgqL/PXPBktBCh0KEu5L8XQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "rollup": "dist/bin/rollup" }, diff --git a/package.json b/package.json index 06a6107..c8b33b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hyperfleet", - "version": "1.0.25", + "version": "1.0.26", "type": "module", "exports": { "./*": "./*" diff --git a/schemas/core/openapi.yaml b/schemas/core/openapi.yaml index 75667a1..efc29ff 100644 --- a/schemas/core/openapi.yaml +++ b/schemas/core/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: HyperFleet API - version: 1.0.25 + version: 1.0.26 contact: name: HyperFleet Team url: https://github.com/openshift-hyperfleet @@ -822,7 +822,7 @@ paths: put: operationId: putNodePoolStatuses summary: Adapter creates or updates nodepool status - description: Adapters call this endpoint to report the status for a nodepool after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified nodepool status. + description: Adapters call this endpoint to report the status for a nodepool after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified nodepool status. Returns 400 Bad Request when mandatory conditions (Available, Applied, Health) are missing or Available has an invalid status value. Returns 204 No Content when the report is silently discarded (e.g., stale generation, duplicate observed time, or subsequent Unknown Available status). parameters: - name: cluster_id in: path @@ -843,6 +843,8 @@ paths: application/json: schema: $ref: '#/components/schemas/AdapterStatus' + '204': + description: 'There is no content to send for this request, but the headers may be useful. ' '400': description: The server could not understand the request due to invalid syntax. content: @@ -931,7 +933,7 @@ paths: put: operationId: putClusterStatuses summary: Adapter creates or updates cluster status - description: Adapters call this endpoint to report the status for a cluster after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified cluster status. + description: Adapters call this endpoint to report the status for a cluster after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). This allows HyperFleet to aggregate multiple adapter perspectives into a unified cluster status. Returns 400 Bad Request when mandatory conditions (Available, Applied, Health) are missing or Available has an invalid status value. Returns 204 No Content when the report is silently discarded (e.g., stale generation, duplicate observed time, or subsequent Unknown Available status). parameters: - name: cluster_id in: path @@ -946,6 +948,8 @@ paths: application/json: schema: $ref: '#/components/schemas/AdapterStatus' + '204': + description: 'There is no content to send for this request, but the headers may be useful. ' '400': description: The server could not understand the request due to invalid syntax. content: @@ -1367,7 +1371,7 @@ paths: put: operationId: putResourceStatuses summary: Adapter creates or updates resource status - description: Adapters call this endpoint to report status for a resource after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). + description: Adapters call this endpoint to report status for a resource after each evaluation. The adapter's status entry is created if it doesn't exist, or updated if it does (upserted by adapter name). Returns 400 Bad Request when mandatory conditions (Available, Applied, Health) are missing or Available has an invalid status value. Returns 204 No Content when the report is silently discarded (e.g., stale generation, duplicate observed time, or subsequent Unknown Available status). parameters: - name: resource_id in: path @@ -1381,6 +1385,8 @@ paths: application/json: schema: $ref: '#/components/schemas/AdapterStatus' + '204': + description: 'There is no content to send for this request, but the headers may be useful. ' '400': description: The server could not understand the request due to invalid syntax. content: