Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 29 additions & 30 deletions src/docs/config-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ The forms are generated using [Angular JSON Schema Form](https://github.com/hamz
"properties": {
"name": {
"title": "Name",
"type": "string",
"required": true
"type": "string"
}
}
},
"required": ["name"]
},
"form": null,
"display": null
Expand Down Expand Up @@ -88,10 +88,10 @@ Setting default values is a great way to ensure your users get up and running as
"name": {
"title": "Name",
"type": "string",
"default": "Daikin AC",
"required": true
"default": "Daikin AC"
}
}
},
"required": ["name"]
}
}
```
Expand Down Expand Up @@ -220,10 +220,10 @@ Dropdown select boxes can be implemented using the JSON Schema `oneOf` attribute
{ "title": "Form", "enum": ["form"] },
{ "title": "Basic Auth", "enum": ["basic"] },
{ "title": "None", "enum": ["none"] }
],
"required": true
]
}
}
},
"required": ["auth"]
}
}
```
Expand Down Expand Up @@ -274,10 +274,10 @@ Help text can be added below each input using the `description` attribute.
"name": {
"title": "Name",
"type": "string",
"required": true,
"description": "The name of the plugin"
}
}
},
"required": ["name"]
}
}
```
Expand Down Expand Up @@ -372,10 +372,10 @@ Example:
"host": {
"title": "IP Address / Hostname",
"type": "string",
"required": true,
"format": "hostname"
}
}
},
"required": ["host"]
}
}
```
Expand Down Expand Up @@ -407,8 +407,7 @@ Full Example:
"name": {
"title": "Name",
"type": "string",
"default": "WeMo Platform",
"required": true
"default": "WeMo Platform"
},
"showOption": {
"title": "Should Show Other Option",
Expand All @@ -421,7 +420,8 @@ Full Example:
"functionBody": "return model.showOption === true;"
}
}
}
},
"required": ["name"]
}
}
```
Expand Down Expand Up @@ -452,10 +452,10 @@ This example shows the simplest `config.schema.json` example.
"name": {
"title": "Name",
"type": "string",
"default": "WeMo Platform",
"required": true
"default": "WeMo Platform"
}
}
},
"required": ["name"]
}
}
```
Expand Down Expand Up @@ -493,8 +493,7 @@ This example shows the config schema for [Sunoo/homebridge-camera-ffmpeg](https:
"name": {
"title": "Name",
"type": "string",
"placeholder": "Enter camera name...",
"required": true
"placeholder": "Enter camera name..."
},
"uploader": {
"type": "boolean"
Expand Down Expand Up @@ -522,8 +521,7 @@ This example shows the config schema for [Sunoo/homebridge-camera-ffmpeg](https:
"source": {
"title": "Source",
"type": "string",
"placeholder": "-re -i rtsp://myfancy_rtsp_stream",
"required": true
"placeholder": "-re -i rtsp://myfancy_rtsp_stream"
},
"stillImageSource": {
"title": "Still Image Source",
Expand Down Expand Up @@ -634,9 +632,11 @@ This example shows the config schema for [Sunoo/homebridge-camera-ffmpeg](https:
"title": "Enable Debug Mode",
"type": "boolean"
}
}
},
"required": ["source"]
}
}
},
"required": ["name"]
}
}
},
Expand Down Expand Up @@ -734,15 +734,14 @@ The `config.schema.json` file would then look like this:
"properties": {
"key": {
"title": "Username",
"type": "string",
"required": true
"type": "string"
},
"value": {
"title": "Password",
"type": "string",
"required": true
"type": "string"
}
}
},
"required": ["key", "value"]
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/docs/custom-plugin-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ const myForm = homebridge.createForm(
properties: {
name: {
title: 'Name',
type: string,
required: true,
type: string
}
}
},
required: ['name']
},
layout: null,
form: null,
Expand Down