app-smart_template Schemas

On this page:

formDocument

{ "$id": "formDocument", "title": "form document", "description": "A form document", "type": "object", "properties": { "_id": { "type": "string", "pattern": "^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$" }, "name": { "$ref": "#/definitions/formName" }, "groups": { "$ref": "#/definitions/groups" }, "created": { "type": "string", "format": "date-time" }, "created_by": { "$ref": "#/definitions/user" }, "last_updated": { "type": "string", "format": "date-time" }, "last_updated_by": { "$ref": "#/definitions/user" }, "elements": { "$ref": "#/definitions/elements" }, "children": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/field" } }, "tags": { "type": "array", "items": { "type": "string" } } }, "required": [ "name", "children", "elements" ], "definitions": { "formName": { "type": "string", "examples": [ "Form 123" ] }, "ObjectId": { "type": "string", "pattern": "^[0-9a-f]{24}$" }, "groups": { "type": "array", "items": { "$ref": "#/definitions/ObjectId" } }, "user": { "$ref": "#/definitions/ObjectId" }, "elements": { "anyOf": [ { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "examples": [ "service_model" ] }, "id": { "type": "object", "properties": { "name": { "type": "string", "examples": [ "/ncs:services/test_devices:service_name" ] } }, "required": [ "name" ] } }, "required": [ "type", "id" ] } } ] }, "field": { "type": "object", "required": [ "properties", "id", "type" ], "properties": { "id": { "type": "string" }, "element": { "type": "string", "examples": [ "{\"type\":\"service_model\",\"id\":{\"name\":\"/ncs:services/devices:stringified_json\"}" ] }, "type": { "type": "string", "examples": [ "container" ] }, "name": { "type": "string", "examples": [ "vlan_id_123" ] }, "display_name": { "type": "string", "examples": [ "vlan" ] }, "source_type": { "type": "string", "examples": [ "service_model" ] }, "source": { "type": "string", "examples": [ "/ncs:services/abc_devices:ios.device" ] }, "key": { "type": "string", "examples": [ "service.vlanid", "key545385c3-fc66-491b-bf6f-abc2214366dc" ] }, "properties": { "type": "object", "properties": { "type": { "type": "string", "examples": [ "leafref" ] }, "path": { "type": "string", "examples": [ "/ncs:devices/ncs:device/ncs:name" ] }, "min": { "anyOf": [ { "type": "string", "examples": [ "1" ] }, { "type": "null" } ] }, "max": { "anyOf": [ { "type": "string", "examples": [ "4" ] }, { "type": "null" } ] }, "minLength": { "anyOf": [ { "type": "string", "examples": [ "1" ] }, { "type": "null" } ] }, "maxLength": { "anyOf": [ { "type": "string", "examples": [ "4" ] }, { "type": "null" } ] }, "default": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" } ] }, "direction": { "type": "string", "examples": [ "vertical" ] }, "required": { "type": "boolean" }, "enforce": { "type": "boolean" }, "hidden": { "type": "boolean" } } } } } } }