Skip to content

Commit ece1aa0

Browse files
committed
refactor: Add example to DataHub validation errors 2
1 parent e84651a commit ece1aa0

File tree

3 files changed

+54
-6
lines changed

3 files changed

+54
-6
lines changed

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

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5190,17 +5190,27 @@ components:
51905190
function:
51915191
type: string
51925192
description: The function.
5193+
example: transform
51935194
path:
51945195
type: string
51955196
format: json-path
51965197
description: The json path.
5198+
example: $.path
51975199
previousFunction:
51985200
type: string
51995201
description: The previous function.
5202+
example: init
52005203
required:
52015204
- function
52025205
- path
52035206
- previousFunction
5207+
example:
5208+
general:
5209+
detail: The operation at '$.path' with the functionId 'transform' must be after a 'init' operation.
5210+
function: transform
5211+
path: $.path
5212+
previousFunction: init
5213+
type: https://hivemq.com/edge/api/model/InvalidFunctionOrderValidationError
52045214
InvalidIdentifierValidationError:
52055215
allOf:
52065216
- $ref: '#/components/schemas/ValidationError'
@@ -5246,17 +5256,31 @@ components:
52465256
- $ref: '#/components/schemas/ValidationError'
52475257
- type: object
52485258
properties:
5249-
field:
5259+
path:
52505260
type: string
5251-
description: The field.
5261+
description: The json path of the field.
5262+
example: $.path
52525263
variables:
52535264
type: array
52545265
items:
52555266
type: string
52565267
description: The unknown variables.
5268+
example:
5269+
- a
5270+
- b
5271+
- c
52575272
required:
5258-
- field
5273+
- path
52595274
- variables
5275+
example:
5276+
general:
5277+
detail: 'Field ''$.path'' contains unknown variables: [a, b, c].'
5278+
path: $.path
5279+
variables:
5280+
- a
5281+
- b
5282+
- c
5283+
type: https://hivemq.com/edge/api/model/UnknownVariableValidationError
52605284
UnsupportedFieldValidationError:
52615285
allOf:
52625286
- $ref: '#/components/schemas/ValidationError'

ext/openAPI/components/schemas/errors/datahub/InvalidFunctionOrderValidationError.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ allOf:
55
function:
66
type: string
77
description: The function.
8+
example: "transform"
89
path:
910
type: string
1011
format: json-path
1112
description: The json path.
13+
example: "$.path"
1214
previousFunction:
1315
type: string
1416
description: The previous function.
17+
example: "init"
1518
required:
1619
- function
1720
- path
1821
- previousFunction
22+
example:
23+
general:
24+
detail: "The operation at '$.path' with the functionId 'transform' must be after a 'init' operation."
25+
function: "transform"
26+
path: "$.path"
27+
previousFunction: "init"
28+
type: "https://hivemq.com/edge/api/model/InvalidFunctionOrderValidationError"

ext/openAPI/components/schemas/errors/datahub/UnknownVariableValidationError.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,28 @@ allOf:
22
- $ref: "../validation/ValidationError.yaml"
33
- type: object
44
properties:
5-
field:
5+
path:
66
type: string
7-
description: The field.
7+
description: The json path of the field.
8+
example: "$.path"
89
variables:
910
type: array
1011
items:
1112
type: string
1213
description: The unknown variables.
14+
example:
15+
- "a"
16+
- "b"
17+
- "c"
1318
required:
14-
- field
19+
- path
1520
- variables
21+
example:
22+
general:
23+
detail: "Field '$.path' contains unknown variables: [a, b, c]."
24+
path: "$.path"
25+
variables:
26+
- "a"
27+
- "b"
28+
- "c"
29+
type: "https://hivemq.com/edge/api/model/UnknownVariableValidationError"

0 commit comments

Comments
 (0)