-
-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add allowedValues to params of error for "enum" keyword #282
Comments
Thinking... In any case, if I add this, it should be inside params. I will need to review errors for other keywords. |
@brodeuralexis given that quite a few keywords have their value (i.e. schema) available inside params already, there is no harm including the property Please let me know if you could make a PR (docs have to be updated as well). |
in 4.6.0 |
I know that using verbose will show the enum values, but it is bloated with unnecessary information (especially for validating required properties). I have to make due with limited bandwith and processing power and do not want to waste them by enabling verbose mode (in the environment I am using, a request that fails validation in verbose mode can take up to 5 seconds for an object with 15 primitive properties).
What version of Ajv are you using? Does the issue happen if you use the latest version?
Version: 4.5.0
It is the latest version.
Ajv options object (see https://github.com/epoberezkin/ajv#options):
JSON Schema (please make it as small as possible to reproduce the issue):
Data (please make it as small as posssible to reproduce the issue):
"maybe"
Your code (please use
options
,schema
anddata
as variables):Error messages:
What results did you expect?
An indication about the possible enum values.
i.e.:
Are you going to resolve the issue?
I might if the client for which I am using this library personnally requests it.
The text was updated successfully, but these errors were encountered: