We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Validators are not loaded when the request path has a dot, for example app/v1.0/path/to/resource.
app/v1.0/path/to/resource
The issue is caused by getValidatorByPathMethodAndCode in schema-utils, which uses lodash to navigate the schema object graph:
getValidatorByPathMethodAndCode
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.
route
This change resolves the issue:
return get(schema[route] || {}, `${request.method}.responses.${response.status}`);
The text was updated successfully, but these errors were encountered:
No validator found when dot in path PayU#75
8c7699f
No branches or pull requests
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: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:
The text was updated successfully, but these errors were encountered: