Config parameters that have defaults should be optional
See original GitHub issueWhen a config parameter has a default value, the user should be able to optionally omit it from the config file.
For example, since playgroundEnabled
has a default value of true, the user need not specify it.
Currently, the server throws an exception for missing parameters.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Optional parameters must specify a default value - Visual Basic
Optional parameters must provide default values that can be used if no parameter is supplied by a calling procedure. Error ID: BC30812. Example....
Read more >Default parameters - JavaScript - MDN Web Docs
Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
Read more >Should I set my optional parameters default as false or true
Since I worked a lot with Vue.js recently, I now tend to always have my optional parameters' default value set to false and...
Read more >Using Python Optional Arguments When Defining Functions
In this tutorial, you'll learn about Python optional arguments and how to define functions with default values. You'll also learn how to create...
Read more >[request] Add optional default value to config.get() #504 - GitHub
If the config contains a name property, thing will be set to its value. If name does not exist, instead of throwing the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The defaults can be what is inside the automatically created config file:
Ideally, we shouldn’t change the type because it will break existing configurations.
I have added a suggestion to the PR, please have a look.