Skip to content

Commit

Permalink
Document default values
Browse files Browse the repository at this point in the history
  • Loading branch information
lstrojny committed Jan 3, 2023
1 parent 9831841 commit 0556ea6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,23 @@ Enable the plugin in the homebridge `config.json`:


// Debugging enabled
//
// Default: false
"debug": "<boolean>",


// Publish all button press states as locks
//
// Pressed button is presented as unlocked, otherwise locked. Can help identify
// the beacon
//
// Default: false
"buttonAsLock": "<boolean>",


// List of devices
//
// Default: []
[
{
// Address
Expand Down
3 changes: 3 additions & 0 deletions code-generation/config-scheme-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ function generateDocs(schema) {
if (definition.description) {
lines.push(`//\n// ${wordwrap(definition.description, 80 - indentation, '\n// ')}`)
}
if (definition.default !== undefined) {
lines.push(`//\n// Default: ${JSON.stringify(definition.default)}`)
}

if (definition.type === 'array') {
lines.push('[')
Expand Down

0 comments on commit 0556ea6

Please sign in to comment.