Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Defining a configuration property as "required", without providing a default value. #29

Closed
redking opened this Issue · 3 comments

3 participants

Cormac Flynn sidazhang Zach Carter
Cormac Flynn

Hey,

Perhaps I'm misreading the docs, but there doesn't appear to be a way to define a configuration property as "required" but without a default value i.e. if the property is not found in the configuration file, then validation will fail.

This would be especially useful when working with a team of developers. As it stands, a developer could delete a config property without understanding the impact; the application might appear to function, falling back to its default value as defined in the schema, but with consequences further down the line.

If this seems useful, I can try to create a pull request.

sidazhang

@redking
+1 on this. I am having the same issue. Any updates on the pull request?

Cormac Flynn

@sidazhang I didn't get a yes or no about whether it was appropriate for the project or not; I'll try to do a PR anyway sometime over the next couple of weeks

Zach Carter
Owner

The philosophy was to have production values be the default values. Usually you only want to change defaults for deploy or instance (in aws speak) specific tweaks. However, you can set a default value to null and if your format doesn't accept null it will throw an error.

Zach Carter zaach closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.