Skip to content
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

Add ProviderValidators to Schema Builder for customize the behavior of CustomValidator dynamically #366

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GiskardB
Copy link

@GiskardB GiskardB commented Apr 25, 2020

With the 'format' attribute of json schema we can use custom validator that must exist in build time, by adding a provider of validators, the library can give the opportunity to launch in runtime, external function on validation process. For example a javascript function or a groovy script.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 91.568% when pulling 914f840 on GiskardB:master into a8dc686 on everit-org:master.

@erosb
Copy link
Contributor

erosb commented Apr 27, 2020

Hello @GiskardB , is this change related to any parts of the json schema specfication?

@GiskardB
Copy link
Author

Hi @erosb, no it's a simple feature of the this library that add custom validator in runtime.

@CrCat
Copy link

CrCat commented May 2, 2020

Nice! This is exactly what I'm looking for to support the flexibility of customized format validation.

Basically, this also satisfy the JSON Schema specification:

Implementations MAY support custom format attributes. Save for agreement between parties, schema authors SHALL NOT expect a peer implementation to support such custom format attributes. An implementation MUST NOT fail validation or cease processing due to an unknown format attribute. When treating "format" as an annotation, implementations SHOULD collect both known and unknown format attribute values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants