Handle with care: regex in machine readable spec versus ApiDoc
Posted: Wed Sep 24, 2025 12:17 pm
I just crashed into this error message and from my perspective you should at least be aware of the underlying concept.
This is not a bug.
Now here's what caused this error : my metadata tags have been set to this. Look at the second tag which is set to "pOrders:0".
In the machine readable spec the regex is documented for both name and tags:
Best regards,
Bernd
This is not a bug.
Code: Select all
{
{ "traceId": "...",
"description": "The validation of the request failed. Details can be found in **causes**.",
"errorCode": "GENERAL_VALIDATION_ERROR",
"causes": [
{ "description": "The value of a string parameter does not satisfy the required pattern.",
"errorCode": "GENERAL_PATTERN_VIOLATED",
"parameter": "$.metadata.tags[1]",
"details": { "pattern": "^[a-zA-Z0-9_-]{1,36}$" }
}
],
"details": {}
}
Code: Select all
"metadata": {
"name": "Dummy Bernd Welter",
"tags": [
"locations-200",
"pOrders:0",
"dOrders-199",
"pdOrders-",
"vehicles-1"
]
}
Code: Select all
"OptimizationRequestMetadata": {
"description": "User-defined request metadata that does not influence the optimization but is returned in the result.",
"type": "object",
"properties": {
"name": {
"description": "The name of the optimization.",
"maxLength": 100, "minLength": 1,
"pattern": "^[a-zA-Z0-9_ -]{1,100}$", "type": "string"
},
"tags": {
"description": "A list of tags of the optimization.",
"maxItems": 5,
"type": "array",
"items": {
"maxLength": 36, "minLength": 1,
"pattern": "^[a-zA-Z0-9_-]{1,36}$", "type": "string"
}}}}
Bernd