json/v2.0/export.json in sk_api_schema-0.10.6 vs json/v2.0/export.json in sk_api_schema-0.11.0

- old
+ new

@@ -1,32 +1,39 @@ -{ "type":"object", +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type":"object", "title": "export", - "name": "export", - "description":"An export in SK", + "description":"An export of SalesKing data", + "required": ["collection_ids", "kind"], "properties":{ "id":{ "description":"Unique identifier - UUID", "identity":true, - "readonly":true, + "readOnly":true, "type":"string", "maxLength": 22, "minLength":22 }, + "company_id":{ + "description":"Company", + "readOnly":true, + "type":"string", + "maxLength": 22, + "minLength":22 + }, "collection_type":{ "description": "The type of data to export. Lower-case singular name of the export data's class(invoice,contact..), see available classes in json schema. Not required for text-exports, getting the type from the export_template.", "type":"string", "maxLength": 20 }, "collection_ids":{ "description": "Comma separated uuid's of the export objects. The backend uses a mysql text-column limited to ~64kb. 100 uuids are ~2.5kb", - "required":true, "type":"string", - "format":"text" + "format":"string" }, "kind":{ "description": "The export type. text: uses an export template defined by a template_id. archived_pdf: zip with archived PDF(documents only). allinone_pdf: All archived PDF(Documents) in one big PDF. attachments: All attachments of the given objects as zip. SEPA: bank exports, relies on valid bank information in your company, the exported document and the contact.", - "required":true, "enum": ["text", "archived_pdf", "attachments", "allinone_pdf", "sepa_debit", "sepa_credit"], "type":"string" }, "template_id":{ "description": "A export template uuid. Required for text exports. collection_type can be empty as is forced to the templates type", @@ -40,47 +47,50 @@ "maxLength": 22, "minLength":22 }, "status":{ "description": "The export status", - "readonly":true, + "readOnly":true, "enum": ["pending", "in_progress", "failed", "success"], "type":"string" }, "log":{ "description": "Errors and warnings, can contain html markup f.ex. links to contacts with invalid back accounts when doing dtaus export", - "readonly":true, + "readOnly":true, "type":"string", - "format": "text" + "format": "string" }, "attachments":{ "description": "The exported data as attachment.", - "readonly":true, + "readOnly":true, "type":"array", - "properties":{"$ref":"./attachment.json#properties"} + "items": { + "type": "object", + "$ref" : "./attachment.json#" + } }, "started_at":{ "description": "Date the was started", "format":"date-time", - "readonly":true, + "readOnly":true, "type":"string" }, "finished_at":{ "description": "Date the was finished", "format":"date-time", - "readonly":true, + "readOnly":true, "type":"string" }, "created_at":{ "description": "Date the object was created in SK. Never changes afterwards", "format":"date-time", - "readonly":true, + "readOnly":true, "type":"string" }, "updated_at":{ "description": "Date the object was edited in SK.", "format":"date-time", - "readonly":true, + "readOnly":true, "type":"string" } }, "links":[ { "rel": "self", \ No newline at end of file