|
1 | 1 | openapi: 3.0.0 |
2 | 2 | info: |
3 | 3 | title: HyperFleet API |
4 | | - version: 1.0.2 |
| 4 | + version: 1.0.3 |
5 | 5 | contact: |
6 | 6 | name: HyperFleet Team |
7 | 7 | license: |
|
37 | 37 | default: |
38 | 38 | description: An unexpected error response. |
39 | 39 | content: |
40 | | - application/json: |
| 40 | + application/problem+json: |
41 | 41 | schema: |
42 | 42 | $ref: '#/components/schemas/Error' |
43 | 43 | security: |
|
64 | 64 | default: |
65 | 65 | description: An unexpected error response. |
66 | 66 | content: |
67 | | - application/json: |
| 67 | + application/problem+json: |
68 | 68 | schema: |
69 | 69 | $ref: '#/components/schemas/Error' |
70 | 70 | requestBody: |
|
98 | 98 | default: |
99 | 99 | description: An unexpected error response. |
100 | 100 | content: |
101 | | - application/json: |
| 101 | + application/problem+json: |
102 | 102 | schema: |
103 | 103 | $ref: '#/components/schemas/Error' |
104 | 104 | security: |
@@ -132,7 +132,7 @@ paths: |
132 | 132 | default: |
133 | 133 | description: An unexpected error response. |
134 | 134 | content: |
135 | | - application/json: |
| 135 | + application/problem+json: |
136 | 136 | schema: |
137 | 137 | $ref: '#/components/schemas/Error' |
138 | 138 | security: |
@@ -160,7 +160,7 @@ paths: |
160 | 160 | default: |
161 | 161 | description: An unexpected error response. |
162 | 162 | content: |
163 | | - application/json: |
| 163 | + application/problem+json: |
164 | 164 | schema: |
165 | 165 | $ref: '#/components/schemas/Error' |
166 | 166 | requestBody: |
@@ -201,7 +201,7 @@ paths: |
201 | 201 | default: |
202 | 202 | description: An unexpected error response. |
203 | 203 | content: |
204 | | - application/json: |
| 204 | + application/problem+json: |
205 | 205 | schema: |
206 | 206 | $ref: '#/components/schemas/Error' |
207 | 207 | security: |
@@ -280,7 +280,7 @@ paths: |
280 | 280 | default: |
281 | 281 | description: An unexpected error response. |
282 | 282 | content: |
283 | | - application/json: |
| 283 | + application/problem+json: |
284 | 284 | schema: |
285 | 285 | $ref: '#/components/schemas/Error' |
286 | 286 | /api/hyperfleet/v1/clusters/{cluster_id}/statuses: |
@@ -373,7 +373,7 @@ paths: |
373 | 373 | default: |
374 | 374 | description: An unexpected error response. |
375 | 375 | content: |
376 | | - application/json: |
| 376 | + application/problem+json: |
377 | 377 | schema: |
378 | 378 | $ref: '#/components/schemas/Error' |
379 | 379 | security: |
@@ -916,33 +916,53 @@ components: |
916 | 916 | description: Status value for conditions |
917 | 917 | Error: |
918 | 918 | type: object |
| 919 | + required: |
| 920 | + - type |
| 921 | + - title |
| 922 | + - status |
919 | 923 | properties: |
920 | | - id: |
| 924 | + type: |
921 | 925 | type: string |
922 | | - kind: |
| 926 | + format: uri |
| 927 | + description: URI reference identifying the problem type |
| 928 | + example: https://api.hyperfleet.io/errors/validation-error |
| 929 | + title: |
923 | 930 | type: string |
924 | | - description: Resource kind |
925 | | - href: |
| 931 | + description: Short human-readable summary of the problem |
| 932 | + example: Validation Failed |
| 933 | + status: |
| 934 | + type: integer |
| 935 | + format: int32 |
| 936 | + description: HTTP status code |
| 937 | + example: 400 |
| 938 | + detail: |
926 | 939 | type: string |
927 | | - description: Resource URI |
| 940 | + description: Human-readable explanation specific to this occurrence |
| 941 | + example: The cluster name field is required |
| 942 | + instance: |
| 943 | + type: string |
| 944 | + format: uri |
| 945 | + description: URI reference for this specific occurrence |
| 946 | + example: /api/hyperfleet/v1/clusters |
928 | 947 | code: |
929 | 948 | type: string |
930 | | - reason: |
| 949 | + description: Machine-readable error code in HYPERFLEET-CAT-NUM format |
| 950 | + example: HYPERFLEET-VAL-001 |
| 951 | + timestamp: |
931 | 952 | type: string |
932 | | - operation_id: |
| 953 | + format: date-time |
| 954 | + description: RFC3339 timestamp of when the error occurred |
| 955 | + example: '2024-01-15T10:30:00Z' |
| 956 | + trace_id: |
933 | 957 | type: string |
934 | | - details: |
| 958 | + description: Distributed trace ID for correlation |
| 959 | + example: abc123def456 |
| 960 | + errors: |
935 | 961 | type: array |
936 | 962 | items: |
937 | | - type: object |
938 | | - properties: |
939 | | - field: |
940 | | - type: string |
941 | | - description: Field path that failed validation |
942 | | - error: |
943 | | - type: string |
944 | | - description: Validation error message for this field |
945 | | - description: Field-level validation errors (optional) |
| 963 | + $ref: '#/components/schemas/ValidationError' |
| 964 | + description: Field-level validation errors (for validation failures) |
| 965 | + description: RFC 9457 Problem Details error format with HyperFleet extensions |
946 | 966 | NodePool: |
947 | 967 | type: object |
948 | 968 | required: |
@@ -1269,6 +1289,40 @@ components: |
1269 | 1289 | - Ready |
1270 | 1290 | - Failed |
1271 | 1291 | description: Phase of a resource (Cluster or NodePool) |
| 1292 | + ValidationConstraint: |
| 1293 | + type: string |
| 1294 | + enum: |
| 1295 | + - required |
| 1296 | + - min |
| 1297 | + - max |
| 1298 | + - min_length |
| 1299 | + - max_length |
| 1300 | + - pattern |
| 1301 | + - enum |
| 1302 | + - format |
| 1303 | + - unique |
| 1304 | + description: Validation constraint types for field-level errors |
| 1305 | + ValidationError: |
| 1306 | + type: object |
| 1307 | + required: |
| 1308 | + - field |
| 1309 | + - message |
| 1310 | + properties: |
| 1311 | + field: |
| 1312 | + type: string |
| 1313 | + description: JSON path to the field that failed validation |
| 1314 | + example: spec.name |
| 1315 | + value: |
| 1316 | + description: The invalid value that was provided (if safe to include) |
| 1317 | + constraint: |
| 1318 | + allOf: |
| 1319 | + - $ref: '#/components/schemas/ValidationConstraint' |
| 1320 | + description: The validation constraint that was violated |
| 1321 | + message: |
| 1322 | + type: string |
| 1323 | + description: Human-readable error message for this field |
| 1324 | + example: Cluster name is required |
| 1325 | + description: Field-level validation error detail (RFC 9457 extension) |
1272 | 1326 | securitySchemes: |
1273 | 1327 | BearerAuth: |
1274 | 1328 | type: http |
|
0 commit comments