-
-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
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
[BUG] New implementation of "nullable" decreases the accuracy of ajv errors. #2751
Comments
Doesn't seems to be a bug @Bugslive Ajv returns errors according to the applied schema. Before the previous fix, the schema was totally wrongs. So if ajv return more errors, but errors are consistent isn't an issue but the expected behavior! |
4 tasks
4 tasks
1 similar comment
🎉 This issue has been resolved in version 7.75.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The new implementation of "Nullable" prevents the developer/API client to capitalize on the AJV errors as all possible format validation errors are returned.
To Reproduce
npm install
npm start
http://127.0.0.1:8083/rest/nullable
with body{"name": "toto", "description": "aaaaaaaaaaaa"}
Expected behavior
The expected number of error is 1, and error to be:
{
"instancePath": "/description",
"schemaPath": "#/properties/description/maxLength",
"keyword": "maxLength",
"params": {
"limit": 10
},
"message": "must NOT have more than 10 characters",
"data": "aaaaaaaaaaaa",
"modelName": "ExampleModel",
"dataPath": ".description",
"requestPath": "body"
}
Code snippets
No response
Repository URL example
https://github.com/Bugslive/nullable
OS
macOS
Node version
Node v22.4.1
Library version
v7.75.4
Additional context
No response
The text was updated successfully, but these errors were encountered: