-
Notifications
You must be signed in to change notification settings - Fork 37
Refactor Errors for DataHub Validation #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+4,299
−548
Merged
Changes from all commits
Commits
Show all changes
121 commits
Select commit
Hold shift + click to select a range
989f4c9
refactor: Add RequestBodyMissingError, TemporaryNotAvailableError
caoccao d3aed68
refactor: Support both behavior and data policies
caoccao ae9c606
feat: Add equals(), hashCode(), toString()
caoccao 08a3e98
refactor: Rename to ApiError
caoccao 47fa8ac
refactor: Add type auto-generation
caoccao ae98dfe
fix: Fix a typo
caoccao f47d750
feat: Add some valication errors for DataHub
caoccao 3bcd582
refactor: Move DataHub errors
caoccao 300b713
feat: Add more common errors
caoccao d23fde2
refactor: Replace common errors with generated ones
caoccao ed24af7
refactor: Refactor validation errors 1
caoccao da95c08
refactor: Refactor DataHub errors 1
caoccao 64e1313
refactor: Refactor DataHub errors 2
caoccao 35e8581
refactor: Refactor DataHub errors 3
caoccao 60b2199
refactor: Clean up ApiError
caoccao 2a80276
refactor: Update get by id for behavior policy
caoccao ae5ec89
refactor: Resolve comments from PR
caoccao c689687
refactor: Update put by id for behavior policy
caoccao c942c46
refactor: Update post by id for behavior policy
caoccao d23be30
refactor: Update get, delete for behavior policy
caoccao 86fc150
refactor: Add client errors for behavior validation states
caoccao 7029d8a
refactor: Refactor post for script
caoccao 42d16db
refactor: Refactor get for script
caoccao 9a0fc37
refactor: Refactor get all for script
caoccao ccda125
refactor: Refactor delete for script
caoccao c992dbb
refactor: Refactor post for schema
caoccao e324ac5
refactor: Refactor get for schema
caoccao d8fcfc5
refactor: Refactor get all for schema
caoccao 6a0777f
refactor: Refactor delete for schema
caoccao c8943b8
refactor: Refactor get for fsm
caoccao c91b345
refactor: Refactor for functions
caoccao 540391b
refactor: Mark errors in ProblemDetails as @Deprecated
caoccao a0ea1ba
Merge pull request #995
vanch3d cdcc735
Merge pull request #997
vanch3d bdf7a3a
Merge pull request #998
vanch3d 108e1f0
refactor: Reuse ProblemDetails, add RequestBodyParameterMissingError
caoccao a602bd3
refactor: Remove x-implements: - com.hivemq.api.errors.OpenApiValida…
caoccao 5b2c061
refactor: Remove x-implements: - com.hivemq.api.errors.OpenApiError
caoccao 8aab183
refactor: Restore errors, remove childErrors
caoccao 1730610
fix: Fix function specs
caoccao cf0cf7f
fix: Remove default status from errors
caoccao c17d8e1
refactor: Add childErrors
caoccao b7db5b9
refactor: Remove ValidationErrors
caoccao c9bb31c
refactor: field to path
caoccao 6922326
fix: Revert application/problem+json to application/json
caoccao d9159c3
feat: Add mapping to datahub API schema responses
caoccao 8db9eb2
Merge pull request #999
vanch3d fc7960a
refactor: Remove title from GeneralPolicyValidationError
caoccao 3d52680
refactor: Add example to InsufficientStorageError
caoccao 773b1c1
refactor: Add example to InternalServerError
caoccao 2ca3785
refactor: Add example to InvalidQueryParameterError
caoccao 2115a44
refactor: Add example to PreconditionFailedError
caoccao 5101ea7
refactor: Add example to RequestBodyMissingError
caoccao c7af13b
refactor: Add example to RequestBodyParameterMissingError
caoccao 5e16cb3
refactor: Add example to TemporaryNotAvailableError
caoccao 6d255e0
refactor: Add example to UrlParameterMissingError
caoccao a2188a5
refactor: Add example to AtLeastOneFieldMissingValidationError
caoccao ebee665
refactor: Add example to EmptyFieldValidationError
caoccao 05a8e2c
refactor: Add example to InvalidFieldLengthValidationError
caoccao ae5e5a4
refactor: Add example to InvalidFieldValueValidationError
caoccao 47d6be0
refactor: Add example to InvalidIdentifierValidationError
caoccao d3ce138
refactor: Add example to MissingFieldValidationError, UnsupportedFiel…
caoccao 19c9121
refactor: Add example to BehaviorPolicyAlreadyPresentError
caoccao 6abf37d
refactor: Add example to BehaviorPolicyCreationFailureError
caoccao 1820eee
refactor: Add example to BehaviorPolicyInvalidErrors
caoccao 93f3911
refactor: Add example to BehaviorPolicyNotFoundError
caoccao 1d5bea1
refactor: Add example to BehaviorPolicyRejectedError, BehaviorPolicyU…
caoccao 523a8b3
refactor: Add example to ClientDisconnectedError, ClientNotFoundError
caoccao fc4715e
refactor: Add example to DataPolicyAlreadyPresentError
caoccao e345d36
refactor: Add example to DataPolicyCreationFailureError
caoccao 7c8e80e
refactor: Add example to DataPolicyInvalidErrors
caoccao 99592bf
refactor: Add example to DataPolicyNotFoundError, DataPolicyRejectedE…
caoccao bbe0e37
refactor: Add example to PolicyIdMismatchError, PolicyNotFoundError
caoccao 841cd97
refactor: Add example to SchemaAlreadyPresentError, SchemaEtagMismatc…
caoccao 4de37ef
refactor: Add example to SchemaInvalidErrors
caoccao 97c0c9b
refactor: Add example to SchemaNotFoundError
caoccao e555481
refactor: Add example to SchemaParsingFailureError, SchemaReferencedE…
caoccao 2c2d71d
refactor: Add example to ScriptAlreadyPresentError, ScriptCreationFai…
caoccao 6ea09be
refactor: Add example to ScriptEtagMismatchError
caoccao 3db3369
refactor: Add example to ScriptInvalidErrors
caoccao 68a04cd
refactor: Add example to ScriptNotFoundError, ScriptParsingFailureError
caoccao d3cee84
refactor: Add example to ScriptReferencedError, ScriptSanitationFailu…
caoccao 7c397f9
refactor: Add example to TopicFilterMismatchError
caoccao 18665ab
refactor: Add example to DataHub validation errors 1
caoccao 4d5f4c6
refactor: Add example to DataHub validation errors 2
caoccao 863e8b1
refactor: Remove GeneralPolicyValidationError
caoccao a35a7e4
refactor: Add PolicyInsufficientStorageError, SchemaInsufficientStora…
caoccao cbab8d6
feat: add a root file for the data hub paths
vanch3d 27ee05d
fix: Generate openapi spec
caoccao f0c016b
fix: Remove duplicated const
caoccao 8753563
refactor: Change 500 for /api/v1/data-hub/interpolation-variables
caoccao 42cbc47
feat: Add openAPI/templates/Java/typeInfoAnnotation.mustache
caoccao 6d115d9
fix: Change openapi to openAPI
caoccao 4debea5
chorg: Rebase from master
caoccao 47bf953
feat: Add problem+json to all DataHub REST API errors
caoccao 5ceb5cd
fix: Fix assertion for problem+json
caoccao 517e729
refactor: Move problem+json to HttpContants
caoccao d347f37
refactor: Add http error 500 to resources
caoccao 6dd5e7f
refactor: Add all http errors to resources
caoccao 0c64cea
fix: Fix typo
caoccao 91beb5f
test: Add whenLocaleIsEnUS_thenErrorCountShouldMatch()
caoccao 4c48529
refactor: Rename all related classes to I18n
caoccao 75c6e40
fix: Exclude .properties from license check
caoccao 526f4ca
refactor: Rename to http-errors-en_US.properties
caoccao 4394286
refactor: Log stack trace in the error log
caoccao 6289d58
refactor: Revise the i18n error template to be thread-safe
caoccao 43522e2
refactor: Revise error enum key generation
caoccao c12bdeb
refactor: Move get() to I18nError
caoccao bea11bb
refactor: Rename some errors to be more specific
caoccao 1f6ee44
fix: Add classloader to i18n
caoccao 4be1985
refactor: Rename ApiError to ApiProblemDetails
caoccao e0c0bc3
fix: Remove ApiError from ErrorResponseUtil
caoccao e8a0861
fix: Regenerate openapi spec
caoccao fb52bf8
feat: Update openapi spec
caoccao 32a6dbf
fix: Reorg the openapi spec
caoccao 5730846
[frontend] enable problem+json in the request headers of the HTTP client
vanch3d a542294
refactor: Update openapi spec
caoccao 186b555
fix: Fix a typo
caoccao ff180e2
refactor: Sync openapi spec
caoccao 0f67110
refactor: Add JsonInclude(JsonInclude.Include.NON_NULL)
caoccao 35d9cce
Revert "refactor: Add JsonInclude(JsonInclude.Include.NON_NULL)"
caoccao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
hivemq-edge-frontend/src/extensions/datahub/hooks/useGetFilteredFunctions.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ properties: | |
| detail: | ||
| type: string | ||
| errors: | ||
| deprecated: true | ||
| type: array | ||
| items: | ||
| $ref: ./Error.yaml | ||
|
|
||
54 changes: 54 additions & 0 deletions
54
hivemq-edge-openapi/openapi/components/schemas/errors/ApiProblemDetails.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
38 changes: 38 additions & 0 deletions
38
...e-openapi/openapi/components/schemas/errors/datahub/AtMostOneFunctionValidationError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
caoccao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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" | ||
17 changes: 17 additions & 0 deletions
17
...-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyAlreadyPresentError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
8 changes: 8 additions & 0 deletions
8
...openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyCreationFailureError.yaml
caoccao marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
24 changes: 24 additions & 0 deletions
24
...q-edge-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyInvalidErrors.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
17 changes: 17 additions & 0 deletions
17
...q-edge-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyNotFoundError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
8 changes: 8 additions & 0 deletions
8
...q-edge-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyRejectedError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
17 changes: 17 additions & 0 deletions
17
...e-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyUpdateFailureError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
26 changes: 26 additions & 0 deletions
26
...edge-openapi/openapi/components/schemas/errors/datahub/BehaviorPolicyValidationError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| allOf: | ||
caoccao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - $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" | ||
17 changes: 17 additions & 0 deletions
17
hivemq-edge-openapi/openapi/components/schemas/errors/datahub/ClientDisconnectedError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
17 changes: 17 additions & 0 deletions
17
hivemq-edge-openapi/openapi/components/schemas/errors/datahub/ClientNotFoundError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
17 changes: 17 additions & 0 deletions
17
...edge-openapi/openapi/components/schemas/errors/datahub/DataPolicyAlreadyPresentError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
8 changes: 8 additions & 0 deletions
8
...dge-openapi/openapi/components/schemas/errors/datahub/DataPolicyCreationFailureError.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.