You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2020. It is now read-only.
We should support them. I haven't added them yet because I haven't needed them for any projects, and also I didn't want to start supporting any optional features until I was pretty sure the design of the rest of the library was right.
Here are the steps to add them:
Re-enable the "optional/format.json" tests from here.
Add a new module with format validators, copying the String module.
(optional) The examples include a demonstration of how to write your own schema specification, say if you wanted to add some custom validators of your own. This gets tested, so when the format tests are enabled it will start breaking too. So the new format validators need to be added here as well for tests to pass.
Open questions:
Normally a lot of the format validators like URI are implemented with a regex. This is Haskell though so maybe we should use actual parsers for them instead?
Does that all make sense? Please feel no pressure to tackle this if you don't want to, but I'm sure someone will need format validators eventually so it will be good to have a solid plan for them.
EDIT: Added the "schema record type" bullet point.
seagreen
changed the title
Support "format" properties
"format" properties not supported
Mar 8, 2018
Is there a specific reason
format
validators are not currently supported?I think this is a very important feature to implement because it's leveraged to heavily in OpenAPI specs.
Is the current behavior of the API to just "skip" them? I don't get validator failures.
How much effort would be required to support these?
I'm hoping at some point to have support in my tool for automating json schema validation w/ data contained inside a swagger spec
The text was updated successfully, but these errors were encountered: