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

Default value #19

Open
jkarni opened this issue Dec 10, 2014 · 4 comments
Open

Default value #19

jkarni opened this issue Dec 10, 2014 · 4 comments

Comments

@jkarni
Copy link

jkarni commented Dec 10, 2014

Is there a way of specifying a default value?

More generally, is the idea to eventually support all of the json-schema spec?

@hesselink
Copy link
Member

What does this mean, exactly? Does it specify the value of some field if you don't send it?

I wasn't aware of json-schema, but it looks interesting (although the spec text is rather sparse). We'll at least look at it for inspiration.

@bergmark
Copy link
Member

To answer your first question: No there is no support for default values.

I'm in principle not against adding it but I don't have a picture of how it would work with recursive calls to schema.

@jkarni
Copy link
Author

jkarni commented Dec 12, 2014

@hesselink exactly - like .!= in aeson, but at the schema level.

I thought this package was based off of the JSON schema spec - my mistake!

@hesselink
Copy link
Member

Sounds good, like @bergmark said. It doesn't exist yet, but feel free to send a pull request!

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

3 participants