path parameter not validated against regex pattern
Issue #359
new
"/customer/{id}": { "get": { "operationId": "getCustomer", "produces": [ "application/json" ], "parameters": [ { "name": "id", "in": "path", "required": true, "pattern": "^[0-9]{6,10}$", "description": "id del cliente", "type": "integer" }, ....
at runtime if I call the following resource:
/customer/345
the library does not validate the path parameter {id} against the regex
The
pattern
validation only applies totype: string
(see https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-5.8)I would suggest using either a
type: string
with your currentpattern
to enforce the numeric value, or useminimum
andmaximum
to constrain the integer value.