plumatic / schema

Clojure(Script) library for declarative data description and validation
Other
2.41k stars 257 forks source link

default values for schemas #276

Closed instilled closed 9 years ago

instilled commented 9 years ago

Something I'm missing from time to time in schema is the ability to provide default values for schemas. I was wondering what others think about this feature and if this is something that is intended for future releases? Thanks, Fabio

w01fe commented 9 years ago

There are some relevant discussions on the mailing list, in particular on the first thread:

https://groups.google.com/forum/#!searchin/prismatic-plumbing/default$20values

If you can provide some more context on why you want to attach default values and where you want them to take effect, that would be helpful. As of now there aren't any plans to add something related to defaults but if there's a concrete proposal we like that could change. (And FWIW, most likely you could add defaulting behavior yourself without needing changes to core).

instilled commented 9 years ago

Jason, thanks for the reply. I've read through the relevant mailing list threads. There's some interesting information there. Would you prefer taking the discussion to the mailing list or shall we continue to use the issue? If it's the mailing list, feel free to close the issue.

w01fe commented 9 years ago

Hi Fabio,

No problem. Whatever you prefer is fine, so long as we preserve the context (i.e., link from here to the relevant past discussions). I have a slight preference for keeping it on the mailing list for now, just to keep all the context together.

Thanks, Jason

On Sun, Sep 27, 2015 at 7:58 AM, Fabio notifications@github.com wrote:

Jason, thanks for the reply. I've read through the relevant mailing list threads. There's some interesting information there. Would you prefer taking the discussion to the mailing list or shall we continue to use the issue? If it's the mailing list, feel free to close the issue.

— Reply to this email directly or view it on GitHub https://github.com/Prismatic/schema/issues/276#issuecomment-143560212.

instilled commented 9 years ago

Hi Jason. I've posted my thoughts here: https://groups.google.com/forum/#!msg/prismatic-plumbing/NWUnqbYhfac/F7QjC-9VCAAJ I'll be closing this issue now. Cheers, Fabio