Is it possible to override validation for a specific type #1067
-
In my example I want to be able to make an ignorecase comparison for enum values passed in the input file. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The {
"enum": ["single","collection", "SINGLE", "COLLECTION"]
} You can of course write a custom |
Beta Was this translation helpful? Give feedback.
-
Thx Justin. The yaml form of the input file is read by SNAKEYAML and it needs the enum to be uppercase and hence the issue. Is this a good example of how I could override enum keyword implementation https://github.com/networknt/json-schema-validator/blob/master/doc/custom-meta-schema.md |
Beta Was this translation helpful? Give feedback.
-
Hi Justin,
My use case got solved by having everything uppercase as suggested by you in the previous comment. I.e. in validation, snake yaml etc. Thx for your help. I will close this discussion |
Beta Was this translation helpful? Give feedback.
Yes that's a good example.
However what you are saying seems to imply that only uppercase enum values are acceptable which means you should be changing your schema to only accept such values.