puppetlabs/puppetdb — pull request #759 by senior (2013-11-19 21:17:01+00:00)
Title: WIP - Using Prismatic Schema for validating/defaulting/converting user config

Still rough, but it looks like it will do what we want.

Current Features:

- Allows specifying an optional value with a default
- Converts a map to the format required by a schema
- Removes keys not defined by a schema

Still Todo:

- Separate into it's own library
- Nested defaulted config - currently I'm pulling the map from a section, might be better to be able to pass in the top level map
- More tests, especially around the glue code and error messages
- Getting better comments/demarcation of functions/schemas intended for other modules to use
- Apply it to more of the config to shake out other shortcomings of the current approach
- Discussion with other Schema users to see if there's any interest in part of this going upstream