{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://migration.documaster.cloud/model.schema.json", "description": "Describes how a single file should be added to Documaster. The main entities used to describe the structure in Documaster is Sections, Entries and Documents. Sections contains Entries and Entries contains Documents.", "type": "object", "additionalProperties": false, "required": ["section"], "properties": { "section": { "type": "string", "description": "Title of the Section where your file should be uploaded.", "examples": [ "Customer Contracts", "Personnel Files" ], "minLength": 1 }, "document": { "type": "object", "description": "Optional description of the Document object, which is the object that will be connected to your source file and provide previews in the UI.", "additionalProperties": false, "properties": { "title": { "type": "string", "description": "Specify a title for the Document. This is optional and will default to the name of the file (without the extension) if not provided. This field is displayed in the main view, next to the preview of your file.", "examples": [ "Image 124", "Attachment", "Email Message" ], "minLength": 1 }, "createdDate": { "type": "string", "format": "date-time", "description": "If given, replaces the default **createdDate** field of the Document. This is optional, and will default to current date if not provided. The field is displayed when opening a Document in the UI.", "examples": [ "2019-08-24T14:15:22Z" ] } } }, "entry": { "type": "object", "description": "Optional description of the Entry object. An Entry holds one or more Documents and is displayed as a list or a grid in the main Documaster view.", "additionalProperties": false, "properties": { "createdDate": { "type": "string", "format": "date-time", "description": "Specify a **createdDate** for the entry. This is optional and will default to current date if not provided. Note that you will be able to sort by this field in the main Documaster view.", "examples": [ "2019-08-24T14:15:22Z" ] }, "title": { "type": "string", "description": "Specify a title for the Entry. This is optional and will default to no title if not provided. Note that you will be able to sort by this field in the main Documaster view.", "examples": [ "Inspection Photos", "Board Meeting" ], "minLength": 1 }, "namespace": { "type": "string", "minLength": 1, "description": "If given, the namespace determines how documents should be grouped (one group will be displayed as a single Entry). Files with the same 'entry.namespace' and 'section' will be grouped together. If you want the file to be shown as a separate Entry, do not provide this field. Note that this field will not be displayd in the UI, as it is only used to determine the grouping.", "examples": [ "inspection-oslo-14.10-2022", "contract-1896373" ] } } }, "classification_tags": { "type": "object", "description": "Describes what tags should be applied to the Entry and how these tags should be grouped.", "additionalProperties": { "type": "array", "uniqueItems": true, "items": { "type":"object", "required": ["title"], "description": "Describes what tags should be applied to the Entry.", "properties":{ "title": { "type": "string", "description": "Title of the tag", "examples": [ "Santa Claus", "Contract", "Oslo" ], "minLength": 1 }, "entry_attributes": { "type": "array", "items": { "type": "object", "uniqueItems": true, "additionalProperties": false, "required": ["name", "type", "value"], "properties": { "name": { "type": "string", "minLength": 1 }, "value": { "type": "string", "minLength": 1 }, "type": { "type": "string", "enum": [ "String", "StringList", "Numeric", "NumericList", "Date", "DateList", "DateTime" ] } }, "allOf": [ { "if": { "properties": { "type": { "enum": ["Date", "DateList"] }} }, "then": { "properties": { "value": { "format": "date" }} } }, { "if": { "properties": { "type": { "const": "DateTime" }} }, "then": { "properties": { "value": { "format": "date-time" }} } } ] } } } } } } } }