-
Notifications
You must be signed in to change notification settings - Fork 65
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
Option to define custom format validators globally #162
Comments
Hi @omkarmoghe! Currently, there isn't a way to register formats globally. You can pass the Lines 183 to 190 in da9c8f9
I think it's a great idea, though. I imagine we would want to provide global options for everything (not just json_schemer/lib/json_schemer/schema.rb Lines 53 to 69 in da9c8f9
Definitely! Let me know if you want to work on it and I'll do my best help. |
Agreed! I generally like this approach to making gems configurable: https://dev.to/vinistock/make-a-ruby-gem-configurable-228d Basically a |
👍 that sounds good to me. |
@omkarmoghe are you still interested in implementing this? |
Hi @davishmcclurg, apologies for the delay, been a busy month/holiday season. I'm working on implementing this now! Should have a PR up this week 🤞🏽 |
Working in this branch: https://github.com/omkarmoghe/json_schemer/tree/default-config |
Thanks again for the help, @omkarmoghe! I merged your changes and will release it shortly. |
Was very interested in using the gem, was curious if there was a way to set or "register" formatters globally? Something similar to https://github.com/voxpupuli/json-schema#custom-format-validation. Would you be open to a PR to enable something like this?
The text was updated successfully, but these errors were encountered: