-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Validators are not loaded when the request path has a dot, for example app/v1.0/path/to/resource.
The issue is caused by getValidatorByPathMethodAndCode in schema-utils, which uses lodash to navigate the schema object graph:
return get(schema, `${route}.${request.method}.responses.${response.status}`);
Since route in this case includes a dot lodash interprets this as a key delimiter and the validator is not found.
This change resolves the issue:
return get(schema[route] || {}, `${request.method}.responses.${response.status}`);
Metadata
Metadata
Assignees
Labels
No labels