Skip to content

Commit e96d2b0

Browse files
committed
refactor: Add PolicyInsufficientStorageError, SchemaInsufficientStorageError, ScriptInsufficientStorageError
1 parent b6e0b42 commit e96d2b0

12 files changed

+123
-22
lines changed

ext/hivemq-edge-openapi-2025.9-SNAPSHOT.yaml

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ paths:
490490
content:
491491
application/json:
492492
schema:
493-
$ref: '#/components/schemas/InsufficientStorageError'
493+
$ref: '#/components/schemas/PolicyInsufficientStorageError'
494494
description: Insufficient storage
495495
summary: Create a new policy
496496
tags:
@@ -795,7 +795,7 @@ paths:
795795
content:
796796
application/json:
797797
schema:
798-
$ref: '#/components/schemas/InsufficientStorageError'
798+
$ref: '#/components/schemas/PolicyInsufficientStorageError'
799799
description: Insufficient storage
800800
summary: Update an existing behavior policy
801801
tags:
@@ -1251,7 +1251,7 @@ paths:
12511251
content:
12521252
application/json:
12531253
schema:
1254-
$ref: '#/components/schemas/InsufficientStorageError'
1254+
$ref: '#/components/schemas/PolicyInsufficientStorageError'
12551255
description: Insufficient storage
12561256
summary: Create a new data policy
12571257
tags:
@@ -1556,7 +1556,7 @@ paths:
15561556
content:
15571557
application/json:
15581558
schema:
1559-
$ref: '#/components/schemas/InsufficientStorageError'
1559+
$ref: '#/components/schemas/PolicyInsufficientStorageError'
15601560
description: Insufficient storage
15611561
summary: Update an existing data policy
15621562
tags:
@@ -2064,7 +2064,7 @@ paths:
20642064
content:
20652065
application/json:
20662066
schema:
2067-
$ref: '#/components/schemas/InsufficientStorageError'
2067+
$ref: '#/components/schemas/SchemaInsufficientStorageError'
20682068
description: Insufficient storage
20692069
summary: Create a new schema
20702070
tags:
@@ -2428,7 +2428,7 @@ paths:
24282428
content:
24292429
application/json:
24302430
schema:
2431-
$ref: '#/components/schemas/InsufficientStorageError'
2431+
$ref: '#/components/schemas/ScriptInsufficientStorageError'
24322432
description: Insufficient storage
24332433
summary: Create a new script
24342434
tags:
@@ -4858,16 +4858,19 @@ components:
48584858
https://hivemq.com/edge/api/model/DataPolicyRejectedError: '#/components/schemas/DataPolicyRejectedError'
48594859
https://hivemq.com/edge/api/model/DataPolicyUpdateFailureError: '#/components/schemas/DataPolicyUpdateFailureError'
48604860
https://hivemq.com/edge/api/model/PolicyIdMismatchError: '#/components/schemas/PolicyIdMismatchError'
4861+
https://hivemq.com/edge/api/model/PolicyInsufficientStorageError: '#/components/schemas/PolicyInsufficientStorageError'
48614862
https://hivemq.com/edge/api/model/PolicyNotFoundError: '#/components/schemas/PolicyNotFoundError'
48624863
https://hivemq.com/edge/api/model/SchemaAlreadyPresentError: '#/components/schemas/SchemaAlreadyPresentError'
48634864
https://hivemq.com/edge/api/model/SchemaEtagMismatchError: '#/components/schemas/SchemaEtagMismatchError'
4865+
https://hivemq.com/edge/api/model/SchemaInsufficientStorageError: '#/components/schemas/SchemaInsufficientStorageError'
48644866
https://hivemq.com/edge/api/model/SchemaInvalidErrors: '#/components/schemas/SchemaInvalidErrors'
48654867
https://hivemq.com/edge/api/model/SchemaNotFoundError: '#/components/schemas/SchemaNotFoundError'
48664868
https://hivemq.com/edge/api/model/SchemaParsingFailureError: '#/components/schemas/SchemaParsingFailureError'
48674869
https://hivemq.com/edge/api/model/SchemaReferencedError: '#/components/schemas/SchemaReferencedError'
48684870
https://hivemq.com/edge/api/model/ScriptAlreadyPresentError: '#/components/schemas/ScriptAlreadyPresentError'
48694871
https://hivemq.com/edge/api/model/ScriptCreationFailureError: '#/components/schemas/ScriptCreationFailureError'
48704872
https://hivemq.com/edge/api/model/ScriptEtagMismatchError: '#/components/schemas/ScriptEtagMismatchError'
4873+
https://hivemq.com/edge/api/model/ScriptInsufficientStorageError: '#/components/schemas/ScriptInsufficientStorageError'
48714874
https://hivemq.com/edge/api/model/ScriptInvalidErrors: '#/components/schemas/ScriptInvalidErrors'
48724875
https://hivemq.com/edge/api/model/ScriptNotFoundError: '#/components/schemas/ScriptNotFoundError'
48734876
https://hivemq.com/edge/api/model/ScriptParsingFailureError: '#/components/schemas/ScriptParsingFailureError'
@@ -5610,6 +5613,24 @@ components:
56105613
detail: The policy ID 'id1' in the request parameter does not match the policy ID 'id2' in the policy request body.
56115614
id: abc
56125615
type: https://hivemq.com/edge/api/model/PolicyIdMismatchError
5616+
PolicyInsufficientStorageError:
5617+
allOf:
5618+
- $ref: '#/components/schemas/ApiError'
5619+
- type: object
5620+
properties:
5621+
id:
5622+
type: string
5623+
description: The policy id.
5624+
example: abc
5625+
required:
5626+
- id
5627+
example:
5628+
general:
5629+
status: 507
5630+
title: Policy Insufficient Storage
5631+
detail: Policy with ID '123' could not be added because of insufficient server storage.
5632+
id: abc
5633+
type: https://hivemq.com/edge/api/model/PolicyInsufficientStorageError
56135634
PolicyNotFoundError:
56145635
allOf:
56155636
- $ref: '#/components/schemas/ApiError'
@@ -5669,6 +5690,24 @@ components:
56695690
id: abc
56705691
eTag: 33a64df551425fcc55e4d42a148795d9f25f89d4
56715692
type: https://hivemq.com/edge/api/model/SchemaEtagMismatchError
5693+
SchemaInsufficientStorageError:
5694+
allOf:
5695+
- $ref: '#/components/schemas/ApiError'
5696+
- type: object
5697+
properties:
5698+
id:
5699+
type: string
5700+
description: The policy id.
5701+
example: abc
5702+
required:
5703+
- id
5704+
example:
5705+
general:
5706+
status: 507
5707+
title: Schema Insufficient Storage
5708+
detail: Schema with ID '123' could not be added because of insufficient server storage.
5709+
id: abc
5710+
type: https://hivemq.com/edge/api/model/SchemaInsufficientStorageError
56725711
SchemaValidationError:
56735712
allOf:
56745713
- $ref: '#/components/schemas/ValidationError'
@@ -5818,6 +5857,24 @@ components:
58185857
id: abc
58195858
eTag: 33a64df551425fcc55e4d42a148795d9f25f89d4
58205859
type: https://hivemq.com/edge/api/model/ScriptEtagMismatchError
5860+
ScriptInsufficientStorageError:
5861+
allOf:
5862+
- $ref: '#/components/schemas/ApiError'
5863+
- type: object
5864+
properties:
5865+
id:
5866+
type: string
5867+
description: The policy id.
5868+
example: abc
5869+
required:
5870+
- id
5871+
example:
5872+
general:
5873+
status: 507
5874+
title: Script Insufficient Storage
5875+
detail: Script with ID '123' could not be added because of insufficient server storage.
5876+
id: abc
5877+
type: https://hivemq.com/edge/api/model/ScriptInsufficientStorageError
58215878
ScriptValidationError:
58225879
allOf:
58235880
- $ref: '#/components/schemas/ValidationError'
@@ -5941,11 +5998,6 @@ components:
59415998
title: Insufficient Storage
59425999
detail: Insufficient Storage.
59436000
type: https://hivemq.com/edge/api/model/InsufficientStorageError
5944-
policy:
5945-
status: 507
5946-
title: Insufficient Storage
5947-
detail: 'Insufficient Storage: The policy with id ''123'' could not be added because of insufficient server storage.'
5948-
type: https://hivemq.com/edge/api/model/InsufficientStorageError
59496001
InternalServerError:
59506002
allOf:
59516003
- $ref: '#/components/schemas/ApiError'

ext/openAPI/components/schemas/errors/ApiError.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,19 @@ discriminator:
1919
https://hivemq.com/edge/api/model/DataPolicyRejectedError: "./datahub/DataPolicyRejectedError.yaml"
2020
https://hivemq.com/edge/api/model/DataPolicyUpdateFailureError: "./datahub/DataPolicyUpdateFailureError.yaml"
2121
https://hivemq.com/edge/api/model/PolicyIdMismatchError: "./datahub/PolicyIdMismatchError.yaml"
22+
https://hivemq.com/edge/api/model/PolicyInsufficientStorageError: "./datahub/PolicyInsufficientStorageError.yaml"
2223
https://hivemq.com/edge/api/model/PolicyNotFoundError: "./datahub/PolicyNotFoundError.yaml"
2324
https://hivemq.com/edge/api/model/SchemaAlreadyPresentError: "./datahub/SchemaAlreadyPresentError.yaml"
2425
https://hivemq.com/edge/api/model/SchemaEtagMismatchError: "./datahub/SchemaEtagMismatchError.yaml"
26+
https://hivemq.com/edge/api/model/SchemaInsufficientStorageError: "./datahub/SchemaInsufficientStorageError.yaml"
2527
https://hivemq.com/edge/api/model/SchemaInvalidErrors: "./datahub/SchemaInvalidErrors.yaml"
2628
https://hivemq.com/edge/api/model/SchemaNotFoundError: "./datahub/SchemaNotFoundError.yaml"
2729
https://hivemq.com/edge/api/model/SchemaParsingFailureError: "./datahub/SchemaParsingFailureError.yaml"
2830
https://hivemq.com/edge/api/model/SchemaReferencedError: "./datahub/SchemaReferencedError.yaml"
2931
https://hivemq.com/edge/api/model/ScriptAlreadyPresentError: "./datahub/ScriptAlreadyPresentError.yaml"
3032
https://hivemq.com/edge/api/model/ScriptCreationFailureError: "./datahub/ScriptCreationFailureError.yaml"
3133
https://hivemq.com/edge/api/model/ScriptEtagMismatchError: "./datahub/ScriptEtagMismatchError.yaml"
34+
https://hivemq.com/edge/api/model/ScriptInsufficientStorageError: "./datahub/ScriptInsufficientStorageError.yaml"
3235
https://hivemq.com/edge/api/model/ScriptInvalidErrors: "./datahub/ScriptInvalidErrors.yaml"
3336
https://hivemq.com/edge/api/model/ScriptNotFoundError: "./datahub/ScriptNotFoundError.yaml"
3437
https://hivemq.com/edge/api/model/ScriptParsingFailureError: "./datahub/ScriptParsingFailureError.yaml"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
allOf:
2+
- $ref: "../ApiError.yaml"
3+
- type: object
4+
properties:
5+
id:
6+
type: string
7+
description: The policy id.
8+
example: "abc"
9+
required:
10+
- id
11+
example:
12+
general:
13+
status: 507
14+
title: "Policy Insufficient Storage"
15+
detail: "Policy with ID '123' could not be added because of insufficient server storage."
16+
id: "abc"
17+
type: "https://hivemq.com/edge/api/model/PolicyInsufficientStorageError"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
allOf:
2+
- $ref: "../ApiError.yaml"
3+
- type: object
4+
properties:
5+
id:
6+
type: string
7+
description: The policy id.
8+
example: "abc"
9+
required:
10+
- id
11+
example:
12+
general:
13+
status: 507
14+
title: "Schema Insufficient Storage"
15+
detail: "Schema with ID '123' could not be added because of insufficient server storage."
16+
id: "abc"
17+
type: "https://hivemq.com/edge/api/model/SchemaInsufficientStorageError"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
allOf:
2+
- $ref: "../ApiError.yaml"
3+
- type: object
4+
properties:
5+
id:
6+
type: string
7+
description: The policy id.
8+
example: "abc"
9+
required:
10+
- id
11+
example:
12+
general:
13+
status: 507
14+
title: "Script Insufficient Storage"
15+
detail: "Script with ID '123' could not be added because of insufficient server storage."
16+
id: "abc"
17+
type: "https://hivemq.com/edge/api/model/ScriptInsufficientStorageError"

ext/openAPI/components/schemas/errors/http/InsufficientStorageError.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,3 @@ example:
66
title: "Insufficient Storage"
77
detail: "Insufficient Storage."
88
type: "https://hivemq.com/edge/api/model/InsufficientStorageError"
9-
policy:
10-
status: 507
11-
title: "Insufficient Storage"
12-
detail: "Insufficient Storage: The policy with id '123' could not be added because of insufficient server storage."
13-
type: "https://hivemq.com/edge/api/model/InsufficientStorageError"

ext/openAPI/paths/api_v1_data-hub_behavior-validation_policies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ post:
316316
content:
317317
application/json:
318318
schema:
319-
$ref: "../components/schemas/errors/http/InsufficientStorageError.yaml"
319+
$ref: "../components/schemas/errors/datahub/PolicyInsufficientStorageError.yaml"
320320
description: Insufficient storage
321321
summary: Create a new policy
322322
tags:

ext/openAPI/paths/api_v1_data-hub_behavior-validation_policies_{policyId}.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ put:
302302
content:
303303
application/json:
304304
schema:
305-
$ref: "../components/schemas/errors/http/InsufficientStorageError.yaml"
305+
$ref: "../components/schemas/errors/datahub/PolicyInsufficientStorageError.yaml"
306306
description: Insufficient storage
307307
summary: Update an existing behavior policy
308308
tags:

ext/openAPI/paths/api_v1_data-hub_data-validation_policies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ post:
427427
content:
428428
application/json:
429429
schema:
430-
$ref: "../components/schemas/errors/http/InsufficientStorageError.yaml"
430+
$ref: "../components/schemas/errors/datahub/PolicyInsufficientStorageError.yaml"
431431
description: Insufficient storage
432432
summary: Create a new data policy
433433
tags:

ext/openAPI/paths/api_v1_data-hub_data-validation_policies_{policyId}.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ put:
314314
content:
315315
application/json:
316316
schema:
317-
$ref: "../components/schemas/errors/http/InsufficientStorageError.yaml"
317+
$ref: "../components/schemas/errors/datahub/PolicyInsufficientStorageError.yaml"
318318
description: Insufficient storage
319319
summary: Update an existing data policy
320320
tags:

0 commit comments

Comments
 (0)