Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
10b3ad9
refactor: Add RequestBodyMissingError, TemporaryNotAvailableError
caoccao May 26, 2025
ef7ea90
refactor: Support both behavior and data policies
caoccao May 26, 2025
e9a340e
feat: Add equals(), hashCode(), toString()
caoccao May 26, 2025
cb58566
refactor: Rename to ApiError
caoccao May 26, 2025
f6f0a2b
refactor: Add type auto-generation
caoccao May 27, 2025
6941ef6
fix: Fix a typo
caoccao May 27, 2025
2b7ed23
feat: Add some valication errors for DataHub
caoccao May 28, 2025
0d63ce4
refactor: Move DataHub errors
caoccao May 28, 2025
6ebde9d
feat: Add more common errors
caoccao May 28, 2025
c3635d8
refactor: Replace common errors with generated ones
caoccao May 28, 2025
cf9912e
refactor: Refactor validation errors 1
caoccao May 30, 2025
1a82472
refactor: Refactor DataHub errors 1
caoccao May 30, 2025
0c9b2a3
refactor: Refactor DataHub errors 2
caoccao May 30, 2025
00e50a5
refactor: Refactor DataHub errors 3
caoccao May 30, 2025
f56b7ae
refactor: Clean up ApiError
caoccao May 30, 2025
7f73a24
refactor: Update get by id for behavior policy
caoccao May 30, 2025
8967c27
refactor: Resolve comments from PR
caoccao May 30, 2025
ed87f5f
refactor: Update put by id for behavior policy
caoccao May 30, 2025
d4fb25c
refactor: Update post by id for behavior policy
caoccao May 30, 2025
f13657d
refactor: Update get, delete for behavior policy
caoccao Jun 2, 2025
f43306a
refactor: Add client errors for behavior validation states
caoccao Jun 2, 2025
4bb6082
refactor: Refactor post for script
caoccao Jun 2, 2025
2631977
refactor: Refactor get for script
caoccao Jun 2, 2025
67e31db
refactor: Refactor get all for script
caoccao Jun 2, 2025
9ee7def
refactor: Refactor delete for script
caoccao Jun 2, 2025
2a4895f
refactor: Refactor post for schema
caoccao Jun 2, 2025
4f68ca2
refactor: Refactor get for schema
caoccao Jun 2, 2025
ef358c3
refactor: Refactor get all for schema
caoccao Jun 2, 2025
f824f82
refactor: Refactor delete for schema
caoccao Jun 2, 2025
974b568
refactor: Refactor get for fsm
caoccao Jun 2, 2025
2eb5362
refactor: Refactor for functions
caoccao Jun 3, 2025
d49f787
refactor: Mark errors in ProblemDetails as @Deprecated
caoccao Jun 3, 2025
bd12d17
Merge pull request #995
vanch3d Jun 3, 2025
f4e23e4
Merge pull request #997
vanch3d Jun 3, 2025
93ca866
Merge pull request #998
vanch3d Jun 3, 2025
c01961f
refactor: Reuse ProblemDetails, add RequestBodyParameterMissingError
caoccao Jun 3, 2025
1c0ebf8
refactor: Remove x-implements: - com.hivemq.api.errors.OpenApiValida…
caoccao Jun 4, 2025
d402916
refactor: Remove x-implements: - com.hivemq.api.errors.OpenApiError
caoccao Jun 4, 2025
9bba335
refactor: Restore errors, remove childErrors
caoccao Jun 4, 2025
3227b43
fix: Fix function specs
caoccao Jun 4, 2025
9fddb73
fix: Remove default status from errors
caoccao Jun 4, 2025
abb54cf
refactor: Add childErrors
caoccao Jun 5, 2025
2fae0de
refactor: Remove ValidationErrors
caoccao Jun 5, 2025
b64017b
refactor: field to path
caoccao Jun 5, 2025
49b3499
fix: Revert application/problem+json to application/json
caoccao Jun 6, 2025
994cd44
feat: Add mapping to datahub API schema responses
caoccao Jun 10, 2025
15344e8
Merge pull request #999
vanch3d Jun 4, 2025
86da335
refactor: Remove title from GeneralPolicyValidationError
caoccao Jun 10, 2025
54cc530
refactor: Add example to InsufficientStorageError
caoccao Jun 11, 2025
0262ed2
refactor: Add example to InternalServerError
caoccao Jun 11, 2025
e12d1c8
refactor: Add example to InvalidQueryParameterError
caoccao Jun 11, 2025
f0b549c
refactor: Add example to PreconditionFailedError
caoccao Jun 11, 2025
54cf7ae
refactor: Add example to RequestBodyMissingError
caoccao Jun 11, 2025
ec4d465
refactor: Add example to RequestBodyParameterMissingError
caoccao Jun 11, 2025
067f33a
refactor: Add example to TemporaryNotAvailableError
caoccao Jun 11, 2025
a2062f1
refactor: Add example to UrlParameterMissingError
caoccao Jun 11, 2025
627bf5c
refactor: Add example to AtLeastOneFieldMissingValidationError
caoccao Jun 11, 2025
6dde9d5
refactor: Add example to EmptyFieldValidationError
caoccao Jun 11, 2025
f638674
refactor: Add example to InvalidFieldLengthValidationError
caoccao Jun 11, 2025
e1216b8
refactor: Add example to InvalidFieldValueValidationError
caoccao Jun 11, 2025
f6a3e3e
refactor: Add example to InvalidIdentifierValidationError
caoccao Jun 11, 2025
fdff373
refactor: Add example to MissingFieldValidationError, UnsupportedFiel…
caoccao Jun 11, 2025
fbb9d8f
refactor: Add example to BehaviorPolicyAlreadyPresentError
caoccao Jun 11, 2025
49c3604
refactor: Add example to BehaviorPolicyCreationFailureError
caoccao Jun 11, 2025
fd15549
refactor: Add example to BehaviorPolicyInvalidErrors
caoccao Jun 11, 2025
6e0c54e
refactor: Add example to BehaviorPolicyNotFoundError
caoccao Jun 11, 2025
2310319
refactor: Add example to BehaviorPolicyRejectedError, BehaviorPolicyU…
caoccao Jun 11, 2025
0ec52ea
refactor: Add example to ClientDisconnectedError, ClientNotFoundError
caoccao Jun 11, 2025
05a6ca9
refactor: Add example to DataPolicyAlreadyPresentError
caoccao Jun 11, 2025
24f4779
refactor: Add example to DataPolicyCreationFailureError
caoccao Jun 11, 2025
459ea9a
refactor: Add example to DataPolicyInvalidErrors
caoccao Jun 11, 2025
562976d
refactor: Add example to DataPolicyNotFoundError, DataPolicyRejectedE…
caoccao Jun 11, 2025
15f93b6
refactor: Add example to PolicyIdMismatchError, PolicyNotFoundError
caoccao Jun 11, 2025
7ca9d81
refactor: Add example to SchemaAlreadyPresentError, SchemaEtagMismatc…
caoccao Jun 11, 2025
5e4775b
refactor: Add example to SchemaInvalidErrors
caoccao Jun 11, 2025
89f23f5
refactor: Add example to SchemaNotFoundError
caoccao Jun 12, 2025
10030ee
refactor: Add example to SchemaParsingFailureError, SchemaReferencedE…
caoccao Jun 12, 2025
1809468
refactor: Add example to ScriptAlreadyPresentError, ScriptCreationFai…
caoccao Jun 12, 2025
d704f6b
refactor: Add example to ScriptEtagMismatchError
caoccao Jun 12, 2025
6beb557
refactor: Add example to ScriptInvalidErrors
caoccao Jun 12, 2025
c371ab6
refactor: Add example to ScriptNotFoundError, ScriptParsingFailureError
caoccao Jun 12, 2025
b4a0490
refactor: Add example to ScriptReferencedError, ScriptSanitationFailu…
caoccao Jun 12, 2025
f32eb41
refactor: Add example to TopicFilterMismatchError
caoccao Jun 12, 2025
20497d2
refactor: Add example to DataHub validation errors 1
caoccao Jun 12, 2025
652c4fe
refactor: Add example to DataHub validation errors 2
caoccao Jun 12, 2025
a3c54e3
refactor: Remove GeneralPolicyValidationError
caoccao Jun 12, 2025
dae95be
refactor: Add PolicyInsufficientStorageError, SchemaInsufficientStora…
caoccao Jun 13, 2025
6da3d67
feat: add a root file for the data hub paths
vanch3d Jun 17, 2025
df4a50c
fix: Generate openapi spec
caoccao Jun 27, 2025
de5db93
fix: Remove duplicated const
caoccao Jun 27, 2025
4d232d1
refactor: Change 500 for /api/v1/data-hub/interpolation-variables
caoccao Jun 30, 2025
b85a4ba
feat: Add openAPI/templates/Java/typeInfoAnnotation.mustache
caoccao Jul 1, 2025
0de054e
fix: Change openapi to openAPI
caoccao Jul 1, 2025
4dd57a0
chorg: Rebase from master
caoccao Jul 1, 2025
8430b99
feat: Add problem+json to all DataHub REST API errors
caoccao Jul 1, 2025
817b940
fix: Fix assertion for problem+json
caoccao Jul 2, 2025
0c7921d
refactor: Move problem+json to HttpContants
caoccao Jul 2, 2025
813fdf4
refactor: Add http error 500 to resources
caoccao Jul 8, 2025
38dedaa
refactor: Add all http errors to resources
caoccao Jul 8, 2025
6b75608
fix: Fix typo
caoccao Jul 8, 2025
9e647a2
test: Add whenLocaleIsEnUS_thenErrorCountShouldMatch()
caoccao Jul 9, 2025
3d88130
refactor: Rename all related classes to I18n
caoccao Jul 9, 2025
0c965e3
fix: Exclude .properties from license check
caoccao Jul 9, 2025
7bcf9ed
refactor: Rename to http-errors-en_US.properties
caoccao Jul 9, 2025
e834788
refactor: Log stack trace in the error log
caoccao Jul 9, 2025
78c9b30
refactor: Revise the i18n error template to be thread-safe
caoccao Jul 9, 2025
233f59a
refactor: Revise error enum key generation
caoccao Jul 9, 2025
f2b98fc
refactor: Move get() to I18nError
caoccao Jul 9, 2025
5d24ee1
refactor: Rename some errors to be more specific
caoccao Jul 11, 2025
bf72642
fix: Add classloader to i18n
caoccao Jul 21, 2025
fb2c2e3
refactor: Rename ApiError to ApiProblemDetails
caoccao Jul 29, 2025
44ecb6b
fix: Remove ApiError from ErrorResponseUtil
caoccao Jul 29, 2025
ef7dd77
fix: Regenerate openapi spec
caoccao Aug 7, 2025
d4d5254
feat: Update openapi spec
caoccao Sep 9, 2025
6e8d383
fix: Reorg the openapi spec
caoccao Oct 2, 2025
defdcb4
[frontend] enable problem+json in the request headers of the HTTP client
vanch3d Oct 17, 2025
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
1,927 changes: 1,687 additions & 240 deletions ext/hivemq-edge-openapi-2025.14.yaml

Large diffs are not rendered by default.

1,927 changes: 1,687 additions & 240 deletions ext/hivemq-edge-openapi-2025.15.yaml

Large diffs are not rendered by default.

1,927 changes: 1,687 additions & 240 deletions ext/hivemq-edge-openapi-2025.17-SNAPSHOT.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ digitalpetri-modbus-tcp = "2.1.0"
dropwizard-metrics = "4.2.33"
equalsverifier = "3.17.5"
errorprone = "2.38.0"
freemarker = "2.3.34"
future-converter = "1.2.0"
guava = "33.4.8-jre"
hikari = "6.2.1"
Expand Down Expand Up @@ -90,6 +91,7 @@ dropwizard-metrics-jvm = { module = "io.dropwizard.metrics:metrics-jvm", version
dropwizard-metrics-logback = { module = "io.dropwizard.metrics:metrics-logback", version.ref = "dropwizard-metrics" }
equalsverifier = { module = "nl.jqno.equalsverifier:equalsverifier", version.ref = "equalsverifier" }
errorprone = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
freemarker = { module = "org.freemarker:freemarker", version.ref = "freemarker" }
json-schema-inferrer = { module = "com.github.saasquatch:json-schema-inferrer", version.ref = "json-schema-inferrer" }
jersey-container-jdk-http = { module = "org.glassfish.jersey.containers:jersey-container-jdk-http", version.ref = "jersey" }
jersey-hk2 = { module = "org.glassfish.jersey.inject:jersey-hk2", version.ref = "jersey" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export const useHttpClient = () => {
{
BASE: config.apiBaseUrl,
TOKEN: credentials?.token,
HEADERS: {
Accept: 'application/json, application/problem+json',
},
},
AxiosHttpRequestWithInterceptors
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { useMemo } from 'react'

import { BehaviorPolicyTransitionEvent, type FunctionSpecs } from '@/api/__generated__'
import { DataHubNodeType } from '@datahub/types.ts'
import { useGetAllFunctionSpecs } from '@datahub/api/hooks/DataHubFunctionsService/useGetAllFunctionSpecs.ts'

export const MqttTransformFunction: FunctionSpecs = {
functionId: 'DataHub.transform',
metadata: {
inLicenseAllowed: true,
isTerminal: false,
isDataOnly: false,
hasArguments: true,
supportedEvents: [
BehaviorPolicyTransitionEvent.EVENT_ON_ANY,
BehaviorPolicyTransitionEvent.MQTT_ON_INBOUND_CONNECT,
BehaviorPolicyTransitionEvent.MQTT_ON_INBOUND_PUBLISH,
BehaviorPolicyTransitionEvent.MQTT_ON_INBOUND_SUBSCRIBE,
BehaviorPolicyTransitionEvent.MQTT_ON_INBOUND_DISCONNECT,
BehaviorPolicyTransitionEvent.CONNECTION_ON_DISCONNECT,
],
},
schema: {
title: 'Transformation',
description:
'The list of Javascript functions used in this transformation operation. Add them directly on the graph',
properties: {
transform: {
type: 'array',
title: 'Execution order',
description: 'Change the order in which the transform functions will be executed',
items: {
type: 'string',
title: 'Function name',
},
},
},
},
}

export const useGetFilteredFunction = (
type: DataHubNodeType = DataHubNodeType.DATA_POLICY,
transition?: BehaviorPolicyTransitionEvent
) => {
const { isError, error, isLoading, isSuccess, data } = useGetAllFunctionSpecs()

const filteredFunctions = useMemo(() => {
if (!data || !data.items?.length) return []

return data.items.filter((functionSpec) => {
if (!functionSpec.metadata.inLicenseAllowed) return false
if (
functionSpec.metadata.supportedEvents?.length &&
transition &&
!functionSpec.metadata.supportedEvents.includes(transition)
)
return false
if (functionSpec.metadata.isDataOnly && type !== DataHubNodeType.DATA_POLICY) return false

// In all other cases, the function is valid
return true
})
}, [data, transition, type])

return { data: [...filteredFunctions, MqttTransformFunction], isError, error, isLoading, isSuccess }
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ properties:
detail:
type: string
errors:
deprecated: true
type: array
items:
$ref: ./Error.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
allOf:
- $ref: "../ProblemDetails.yaml"
- type: object
required:
- detail
- status
- type
discriminator:
propertyName: type
mapping:
# DataHub
https://hivemq.com/edge/api/model/BehaviorPolicyAlreadyPresentError: "./datahub/BehaviorPolicyAlreadyPresentError.yaml"
https://hivemq.com/edge/api/model/BehaviorPolicyCreationFailureError: "./datahub/BehaviorPolicyCreationFailureError.yaml"
https://hivemq.com/edge/api/model/BehaviorPolicyInvalidErrors: "./datahub/BehaviorPolicyInvalidErrors.yaml"
https://hivemq.com/edge/api/model/BehaviorPolicyNotFoundError: "./datahub/BehaviorPolicyNotFoundError.yaml"
https://hivemq.com/edge/api/model/BehaviorPolicyRejectedError: "./datahub/BehaviorPolicyRejectedError.yaml"
https://hivemq.com/edge/api/model/BehaviorPolicyUpdateFailureError: "./datahub/BehaviorPolicyUpdateFailureError.yaml"
https://hivemq.com/edge/api/model/ClientDisconnectedError: "./datahub/ClientDisconnectedError.yaml"
https://hivemq.com/edge/api/model/ClientNotFoundError: "./datahub/ClientNotFoundError.yaml"
https://hivemq.com/edge/api/model/DataPolicyAlreadyPresentError: "./datahub/DataPolicyAlreadyPresentError.yaml"
https://hivemq.com/edge/api/model/DataPolicyCreationFailureError: "./datahub/DataPolicyCreationFailureError.yaml"
https://hivemq.com/edge/api/model/DataPolicyInvalidErrors: "./datahub/DataPolicyInvalidErrors.yaml"
https://hivemq.com/edge/api/model/DataPolicyNotFoundError: "./datahub/DataPolicyNotFoundError.yaml"
https://hivemq.com/edge/api/model/DataPolicyRejectedError: "./datahub/DataPolicyRejectedError.yaml"
https://hivemq.com/edge/api/model/DataPolicyUpdateFailureError: "./datahub/DataPolicyUpdateFailureError.yaml"
https://hivemq.com/edge/api/model/PolicyIdMismatchError: "./datahub/PolicyIdMismatchError.yaml"
https://hivemq.com/edge/api/model/PolicyInsufficientStorageError: "./datahub/PolicyInsufficientStorageError.yaml"
https://hivemq.com/edge/api/model/PolicyNotFoundError: "./datahub/PolicyNotFoundError.yaml"
https://hivemq.com/edge/api/model/SchemaAlreadyPresentError: "./datahub/SchemaAlreadyPresentError.yaml"
https://hivemq.com/edge/api/model/SchemaEtagMismatchError: "./datahub/SchemaEtagMismatchError.yaml"
https://hivemq.com/edge/api/model/SchemaInsufficientStorageError: "./datahub/SchemaInsufficientStorageError.yaml"
https://hivemq.com/edge/api/model/SchemaInvalidErrors: "./datahub/SchemaInvalidErrors.yaml"
https://hivemq.com/edge/api/model/SchemaNotFoundError: "./datahub/SchemaNotFoundError.yaml"
https://hivemq.com/edge/api/model/SchemaParsingFailureError: "./datahub/SchemaParsingFailureError.yaml"
https://hivemq.com/edge/api/model/SchemaReferencedError: "./datahub/SchemaReferencedError.yaml"
https://hivemq.com/edge/api/model/ScriptAlreadyPresentError: "./datahub/ScriptAlreadyPresentError.yaml"
https://hivemq.com/edge/api/model/ScriptCreationFailureError: "./datahub/ScriptCreationFailureError.yaml"
https://hivemq.com/edge/api/model/ScriptEtagMismatchError: "./datahub/ScriptEtagMismatchError.yaml"
https://hivemq.com/edge/api/model/ScriptInsufficientStorageError: "./datahub/ScriptInsufficientStorageError.yaml"
https://hivemq.com/edge/api/model/ScriptInvalidErrors: "./datahub/ScriptInvalidErrors.yaml"
https://hivemq.com/edge/api/model/ScriptNotFoundError: "./datahub/ScriptNotFoundError.yaml"
https://hivemq.com/edge/api/model/ScriptParsingFailureError: "./datahub/ScriptParsingFailureError.yaml"
https://hivemq.com/edge/api/model/ScriptReferencedError: "./datahub/ScriptReferencedError.yaml"
https://hivemq.com/edge/api/model/ScriptSanitationFailureError: "./datahub/ScriptSanitationFailureError.yaml"
https://hivemq.com/edge/api/model/TopicFilterMismatchError: "./datahub/TopicFilterMismatchError.yaml"
# HTTP
https://hivemq.com/edge/api/model/InsufficientStorageError: "./http/InsufficientStorageError.yaml"
https://hivemq.com/edge/api/model/InternalServerError: "./http/InternalServerError.yaml"
https://hivemq.com/edge/api/model/InvalidQueryParameterError: "./http/InvalidQueryParameterError.yaml"
https://hivemq.com/edge/api/model/PreconditionFailedError: "./http/PreconditionFailedError.yaml"
https://hivemq.com/edge/api/model/RequestBodyMissingError: "./http/RequestBodyMissingError.yaml"
https://hivemq.com/edge/api/model/RequestBodyParameterMissingError: "./http/RequestBodyParameterMissingError.yaml"
https://hivemq.com/edge/api/model/TemporaryNotAvailableError: "./http/TemporaryNotAvailableError.yaml"
https://hivemq.com/edge/api/model/UrlParameterMissingError: "./http/UrlParameterMissingError.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
allOf:
- $ref: "../validation/ValidationError.yaml"
- type: object
properties:
function:
type: string
description: The function.
example: "function1"
occurrences:
type: integer
format: int32
description: The occurrences of the function.
minimum: 0
example: 3
paths:
type: array
items:
type: string
format: json-path
description: The json paths where the function occurs.
example:
- "$.path1"
- "$.path2"
- "$.path3"
required:
- function
- occurrences
- paths
example:
general:
detail: "The pipeline must contain at most one 'function1' function, but 3 were found at ['$.path1', '$.path2', '$.path3']."
function: "function1"
occurrences: 3
paths:
- "$.path1"
- "$.path2"
- "$.path3"
type: "https://hivemq.com/edge/api/model/AtMostOneFunctionValidationError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
- type: object
properties:
id:
type: string
description: The behavior policy id.
example: "abc"
required:
- id
example:
general:
status: 409
title: "Behavior Policy Already Present"
detail: "The given behavior policy 'abc' is already present."
id: "abc"
type: "https://hivemq.com/edge/api/model/BehaviorPolicyAlreadyPresentError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
example:
general:
status: 400
title: "Behavior Policy Creation Failed"
detail: "Behavior policy creation failed: The policy was rejected."
type: "https://hivemq.com/edge/api/model/BehaviorPolicyCreationFailureError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
- type: object
properties:
childErrors:
type: array
description: List of child validation errors.
items:
$ref: "./BehaviorPolicyValidationError.yaml"
required:
- childErrors
example:
general:
status: 400
title: "Behavior Policy Invalid"
detail: "Behavior policy is invalid due to validation errors."
type: "https://hivemq.com/edge/api/model/BehaviorPolicyInvalidErrors"
childErrors:
- detail: "The transition from state 'state1' to state 'state2' on event 'event1' in '$.path' is not defined for behavior 'id1'."
fromState: "state1"
toState: "state2"
path: "$.path"
id: "id1"
type: "https://hivemq.com/edge/api/model/IllegalEventTransitionValidationError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
- type: object
properties:
id:
type: string
description: The data policy id.
example: "abc"
required:
- id
example:
general:
status: 404
title: "Behavior Policy Not Found"
detail: "Behavior policy with ID 'abc' is not found."
id: "abc"
type: "https://hivemq.com/edge/api/model/BehaviorPolicyNotFoundError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
example:
general:
status: 400
title: "Behavior Policy Rejected"
detail: "Behavior policy is rejected."
type: "https://hivemq.com/edge/api/model/BehaviorPolicyRejectedError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
- type: object
properties:
id:
type: string
description: The ID of the policy that failed to update.
example: "abc"
required:
- id
example:
general:
status: 400
title: "Behavior Policy Update Failed"
detail: "Behavior policy with ID 'abc' update failed."
id: "abc"
type: "https://hivemq.com/edge/api/model/BehaviorPolicyUpdateFailureError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
allOf:
- $ref: "../validation/ValidationError.yaml"
- oneOf:
- $ref: "./IllegalEventTransitionValidationError.yaml"
- $ref: "./IllegalFunctionValidationError.yaml"
- $ref: "./InvalidSchemaVersionValidationError.yaml"
- $ref: "../validation/AtLeastOneFieldMissingValidationError.yaml"
- $ref: "../validation/EmptyFieldValidationError.yaml"
- $ref: "../validation/InvalidFieldLengthValidationError.yaml"
- $ref: "../validation/InvalidFieldValueValidationError.yaml"
- $ref: "../validation/InvalidIdentifierValidationError.yaml"
- $ref: "../validation/MissingFieldValidationError.yaml"
- $ref: "../validation/UnsupportedFieldValidationError.yaml"
discriminator:
propertyName: type
mapping:
https://hivemq.com/edge/api/model/AtLeastOneFieldMissingValidationError: "../validation/AtLeastOneFieldMissingValidationError.yaml"
https://hivemq.com/edge/api/model/EmptyFieldValidationError: "../validation/EmptyFieldValidationError.yaml"
https://hivemq.com/edge/api/model/IllegalEventTransitionValidationError: "./IllegalEventTransitionValidationError.yaml"
https://hivemq.com/edge/api/model/IllegalFunctionValidationError: "./IllegalFunctionValidationError.yaml"
https://hivemq.com/edge/api/model/InvalidFieldLengthValidationError: "../validation/InvalidFieldLengthValidationError.yaml"
https://hivemq.com/edge/api/model/InvalidFieldValueValidationError: "../validation/InvalidFieldValueValidationError.yaml"
https://hivemq.com/edge/api/model/InvalidIdentifierValidationError: "../validation/InvalidIdentifierValidationError.yaml"
https://hivemq.com/edge/api/model/InvalidSchemaVersionValidationError: "./InvalidSchemaVersionValidationError.yaml"
https://hivemq.com/edge/api/model/MissingFieldValidationError: "../validation/MissingFieldValidationError.yaml"
https://hivemq.com/edge/api/model/UnsupportedFieldValidationError: "../validation/UnsupportedFieldValidationError.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
- type: object
properties:
id:
type: string
description: The client id.
example: "abc"
required:
- id
example:
general:
status: 404
title: "Client Disconnected"
detail: "Client with ID 'abc' is disconnected."
id: "abc"
type: "https://hivemq.com/edge/api/model/ClientDisconnectedError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
- type: object
properties:
id:
type: string
description: The client id.
example: "abc"
required:
- id
example:
general:
status: 404
title: "Client Not Found"
detail: "Client with ID 'abc' is not found."
id: "abc"
type: "https://hivemq.com/edge/api/model/ClientNotFoundError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
- type: object
properties:
id:
type: string
description: The data policy id.
example: "abc"
required:
- id
example:
general:
status: 409
title: "Data Policy Already Present"
detail: "The given data policy 'abc' is already present."
id: "abc"
type: "https://hivemq.com/edge/api/model/DataPolicyAlreadyPresentError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
allOf:
- $ref: "../ApiProblemDetails.yaml"
example:
general:
status: 400
title: "Data Policy Creation Failed"
detail: "Data policy creation failed: The policy was rejected."
type: "https://hivemq.com/edge/api/model/DataPolicyCreationFailureError"
Loading
Loading