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

Have clear intent about enum attribute of any validator when calling directly #12

Open
nohponex opened this issue Jun 25, 2017 · 0 comments

Comments

@nohponex
Copy link
Member

Because all validators support the enum attribute, it is now clear to library end-users what will happen with it.

phramework/jsonapi has a separate (custom) EnumValidator and "type": "enum", which essential is the same as having "enum": [...] inside the schema.

So for users that are used or know JSON to any ValidatorFiller besides the EnumValidatorFiller` it will ignore the enum attribute.

Initial design and intent was to, intercept the presence of enum attribute at FillerRepository->fill and redirect/use it with EnumValidatorFiller implementation of returning a random item

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

No branches or pull requests

1 participant