Document configuration default values (#91)
This commit is contained in:
parent
626ff1951b
commit
67824f6a37
2 changed files with 17 additions and 0 deletions
14
README.md
14
README.md
|
@ -133,16 +133,22 @@ Once *Prometheus* is restarted, metrics with the `homebridge_` prefix should sta
|
|||
|
||||
|
||||
// Debug
|
||||
//
|
||||
// Default: false
|
||||
"debug": "<boolean>",
|
||||
|
||||
|
||||
// Metrics prefix
|
||||
//
|
||||
// Default: "homebridge"
|
||||
"prefix": "<string>",
|
||||
|
||||
|
||||
// Metrics server port
|
||||
//
|
||||
// TCP port where the Prometheus metrics server listens
|
||||
//
|
||||
// Default: 36123
|
||||
"port": "<integer>",
|
||||
|
||||
|
||||
|
@ -151,24 +157,32 @@ Once *Prometheus* is restarted, metrics with the `homebridge_` prefix should sta
|
|||
// Interface where the Prometheus metrics server listens. Can be an IP, a
|
||||
// hostname, "0.0.0.0" for all IPv4 interfaces, "::1" for all IPv6 interfaces.
|
||||
// Default is "::" which means "any interface"
|
||||
//
|
||||
// Default: "::"
|
||||
"interface": "<string>",
|
||||
|
||||
|
||||
// Service refresh interval
|
||||
//
|
||||
// Discover new services every <interval> seconds
|
||||
//
|
||||
// Default: 60
|
||||
"refresh_interval": "<integer>",
|
||||
|
||||
|
||||
// Request timeout
|
||||
//
|
||||
// Request timeout when interacting with homebridge instances
|
||||
//
|
||||
// Default: 10
|
||||
"request_timeout": "<integer>",
|
||||
|
||||
|
||||
// Service discovery timeout
|
||||
//
|
||||
// Discovery timeout after which the current discovery is considered failed
|
||||
//
|
||||
// Default: 20
|
||||
"discovery_timeout": "<integer>",
|
||||
|
||||
|
||||
|
|
|
@ -56,6 +56,9 @@ function generateDocs(schema) {
|
|||
if (definition.description) {
|
||||
lines.push(`//\n// ${wordwrap(definition.description, 80, '\n// ')}`)
|
||||
}
|
||||
if (definition.default !== undefined) {
|
||||
lines.push(`//\n// Default: ${JSON.stringify(definition.default)}`)
|
||||
}
|
||||
|
||||
lines.push(`${JSON.stringify(property)}: ${JSON.stringify('<' + definition.type + '>')}`)
|
||||
|
||||
|
|
Loading…
Reference in a new issue