{"_id":"579a5510c2c4d30e00da3932","githubsync":"","__v":0,"category":{"_id":"579a382265f89a170099946f","project":"573f3f6c87cbd20e00208e41","version":"573f3f6c87cbd20e00208e42","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-28T16:51:46.560Z","from_sync":false,"order":9999,"slug":"schemas","title":"Schemas"},"user":"5564f227f0f70f0d00a9ab20","version":{"_id":"573f3f6c87cbd20e00208e42","__v":2,"project":"573f3f6c87cbd20e00208e41","createdAt":"2016-05-18T20:59:16.635Z","releaseDate":"2016-05-18T20:59:16.635Z","categories":["573f3f6c87cbd20e00208e44","573f3f6c87cbd20e00208e43","573f3f6c87cbd20e00208e45","573f3f6c87cbd20e00208e46","573f3f6c87cbd20e00208e47","573f3f6c87cbd20e00208e48","573f3f6c87cbd20e00208e49","573f3f6c87cbd20e00208e4a","573f3f6c87cbd20e00208e4b","579a382265f89a170099946f","57bce03036eff81700666963"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"573f3f6c87cbd20e00208e41","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-28T18:55:12.773Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"The Form schema allows a device to control what properties are editable, and control the type of data stored to those properties. We support much of [JSON Schema](http://json-schema.org/), but not all the options are available.\n\nOctoblu provides some specific extensions to the standard JSON Schema. This guide will cover some of the Octoblu specific ideas, and will not be a general JSON Schema tutorial.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Multiple Types\"\n}\n[/block]\nOctoblu supports multiple types of form schemas.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"schemas\\\": {\\n    \\\"form\\\": {\\n      \\\"configure\\\": { ... },\\n      \\\"message\\\": { ... }\\n    }\\n  }\\n}     \",\n      \"language\": \"json\",\n      \"name\": \"Multiple Type Example\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Multiple Form Schemas\"\n}\n[/block]\nOctoblu supports multiple form schemas for each type.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"schemas\\\": {\\n    \\\"form\\\": {\\n      \\\"configure\\\": {\\n        \\\"first\\\": { ... },\\n        \\\"second\\\": { ... },\\n        \\\"third\\\": { ... }\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Multiple Message Example\"\n    }\n  ]\n}\n[/block]\nWhen the user views this configuration in Octoblu, they will be presented a choice between the schemas. This allows the schema author to provide different configurations, `Basic` and `Advanced` for example.","excerpt":"","slug":"schema-form","type":"basic","title":"Form"}
The Form schema allows a device to control what properties are editable, and control the type of data stored to those properties. We support much of [JSON Schema](http://json-schema.org/), but not all the options are available. Octoblu provides some specific extensions to the standard JSON Schema. This guide will cover some of the Octoblu specific ideas, and will not be a general JSON Schema tutorial. [block:api-header] { "type": "basic", "title": "Multiple Types" } [/block] Octoblu supports multiple types of form schemas. [block:code] { "codes": [ { "code": "{\n \"schemas\": {\n \"form\": {\n \"configure\": { ... },\n \"message\": { ... }\n }\n }\n} ", "language": "json", "name": "Multiple Type Example" } ] } [/block] [block:api-header] { "type": "basic", "title": "Multiple Form Schemas" } [/block] Octoblu supports multiple form schemas for each type. [block:code] { "codes": [ { "code": "{\n \"schemas\": {\n \"form\": {\n \"configure\": {\n \"first\": { ... },\n \"second\": { ... },\n \"third\": { ... }\n }\n }\n }\n}", "language": "json", "name": "Multiple Message Example" } ] } [/block] When the user views this configuration in Octoblu, they will be presented a choice between the schemas. This allows the schema author to provide different configurations, `Basic` and `Advanced` for example.