Add ability to support case-insensitive enum validation
Issue #23
new
The JSON Schema spec treats enum validation as case-sensitive - http://json-schema.org/latest/json-schema-validation.html#anchor76
There are some cases where case-insensitive validation would be desirable.
e.g.
java.lang.AssertionError: Validation errors found.
* atlassian-scheduler
- schedule a new job
[ERROR] [Path '/notificationMethod'] Instance value ("unknown") not found in enum (possible values: ["SQS","HTTP_GET","HTTP_POST","HTTP_PUT","HTTP_DELETE","NONE","UNKNOWN"])
[ERROR] [Path '/type'] Instance value ("interval") not found in enum (possible values: ["SINGLE","CRON","INTERVAL","UNKNOWN"])
Comments (3)
-
reporter -
How does the framework know that user would like to perform case insensitive validation in case of failure? Also people may not look into log unless something failing in CI. I prefer to have a config options like enableCaseInsensitiveEnumValidation()
-
That feature would come in handy for us at this point.
But I see a major problem. What if case-insensitivity is good for some enums but not for others in the same API definition?
- Log in to comment
Ideally we could support this using the log levels mechanism rather than introducing a new configuration mechanism.
Some ideas: