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

Generate from regex #8

Open
Rovanion opened this issue Apr 26, 2017 · 2 comments
Open

Generate from regex #8

Rovanion opened this issue Apr 26, 2017 · 2 comments

Comments

@Rovanion
Copy link

Regexes seem to be accepted schemas:

(schema/validate #"hi" "hi") ; => "hi"

But schema-generators can't seem to generate from them:

(gen/generate #"hi")

Is it just something which is left to implement?

@Rovanion
Copy link
Author

Managed to work around by attaching a generator from an external library: http://stackoverflow.com/questions/43635022/generate-from-regular-expression-with-plumatic-schema-generators/43635023#43635023

@w01fe
Copy link
Member

w01fe commented Apr 26, 2017

Looks right to me, thanks for the follow up. I'm not sure we would want to add a dependency to support this out of the box but are potentially open to the idea.

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

No branches or pull requests

2 participants