- edited description
Error message when required parameter is missing is misleading
Issue #74
new
Because of the way parameters are wrapped in a value
property (so required
can be validated using json schema validation), missing parameter validation errors are misleading. E.g. a missing queryArg
required query parameter will result in an error with:
code: 'request.query.incompatible',
message: 'Value is incompatible with the parameter defined in the spec file: should have required property \'value\'',
instead of:
code: 'request.query.incompatible',
message: 'Value is incompatible with the parameter defined in the spec file: should have required property \'queryArg\'',
We should use parsedSpecParameter.name
instead of the hardcoded 'value'
in:
- https://bitbucket.org/atlassian/swagger-mock-validator/src/c35a4b29405f1da68dabf855e405075867203769/lib/swagger-mock-validator/validate-spec-and-mock/validate-mock-value-against-spec.ts#lines-15
- and https://bitbucket.org/atlassian/swagger-mock-validator/src/c35a4b29405f1da68dabf855e405075867203769/lib/swagger-mock-validator/validate-spec-and-mock/validate-mock-value-against-spec.ts#lines-65
Comments (1)
-
Account Deactivated reporter - Log in to comment