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
|
// Debug
|
||||||
|
//
|
||||||
|
// Default: false
|
||||||
"debug": "<boolean>",
|
"debug": "<boolean>",
|
||||||
|
|
||||||
|
|
||||||
// Metrics prefix
|
// Metrics prefix
|
||||||
|
//
|
||||||
|
// Default: "homebridge"
|
||||||
"prefix": "<string>",
|
"prefix": "<string>",
|
||||||
|
|
||||||
|
|
||||||
// Metrics server port
|
// Metrics server port
|
||||||
//
|
//
|
||||||
// TCP port where the Prometheus metrics server listens
|
// TCP port where the Prometheus metrics server listens
|
||||||
|
//
|
||||||
|
// Default: 36123
|
||||||
"port": "<integer>",
|
"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
|
// 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.
|
// hostname, "0.0.0.0" for all IPv4 interfaces, "::1" for all IPv6 interfaces.
|
||||||
// Default is "::" which means "any interface"
|
// Default is "::" which means "any interface"
|
||||||
|
//
|
||||||
|
// Default: "::"
|
||||||
"interface": "<string>",
|
"interface": "<string>",
|
||||||
|
|
||||||
|
|
||||||
// Service refresh interval
|
// Service refresh interval
|
||||||
//
|
//
|
||||||
// Discover new services every <interval> seconds
|
// Discover new services every <interval> seconds
|
||||||
|
//
|
||||||
|
// Default: 60
|
||||||
"refresh_interval": "<integer>",
|
"refresh_interval": "<integer>",
|
||||||
|
|
||||||
|
|
||||||
// Request timeout
|
// Request timeout
|
||||||
//
|
//
|
||||||
// Request timeout when interacting with homebridge instances
|
// Request timeout when interacting with homebridge instances
|
||||||
|
//
|
||||||
|
// Default: 10
|
||||||
"request_timeout": "<integer>",
|
"request_timeout": "<integer>",
|
||||||
|
|
||||||
|
|
||||||
// Service discovery timeout
|
// Service discovery timeout
|
||||||
//
|
//
|
||||||
// Discovery timeout after which the current discovery is considered failed
|
// Discovery timeout after which the current discovery is considered failed
|
||||||
|
//
|
||||||
|
// Default: 20
|
||||||
"discovery_timeout": "<integer>",
|
"discovery_timeout": "<integer>",
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,9 @@ function generateDocs(schema) {
|
||||||
if (definition.description) {
|
if (definition.description) {
|
||||||
lines.push(`//\n// ${wordwrap(definition.description, 80, '\n// ')}`)
|
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 + '>')}`)
|
lines.push(`${JSON.stringify(property)}: ${JSON.stringify('<' + definition.type + '>')}`)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue