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

- old
+ new

@@ -1,100 +1,107 @@ -{ "type":"object", +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type":"object", "title": "email", - "name": "email", "description":"An email in SK must always be related to an object. Receivers are limited to 5 per address field.", + "required": ["to_addr", "subject", "body", "related_object_type", "related_object_id" ], "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 + }, "bcc_addr":{ "description": "BCC addresses, comma separated. Max 5, format: a@b.de,'George'<georg@sk.eu>", "type":"string", - "format":"text" + "format":"string" }, "cc_addr":{ "description": "CC addresses, comma separated. Max 5, format: a@b.de,'George'<georg@sk.eu>", "type":"string", - "format":"text" + "format":"string" }, "from_addr":{ "description": "From address. If empty the email of the current user is taken.", "type":"string", "maxLength": 255 }, "to_addr":{ "description": "TO addresses, comma separated. Max 5, format: a@b.de,'George'<georg@sk.eu>", - "required":true, "type":"string", - "format":"text" + "format":"string" }, "subject":{ "description": "The email subject.", - "required":true, "type":"string", "maxLength": 255 }, "body":{ "description": "The email text.", - "required":true, "type":"string", - "format":"text" + "format":"string" }, "attachments":{ "description": "The emails attachments.", - "readonly":true, + "readOnly":true, "type":"array", - "properties":{"$ref":"./attachment.json#properties"} + "items": { + "type": "object", + "$ref":"./attachment.json#" + } }, "related_object_type":{ "description": "Object type of the emails parent. Is the camelcased base class name: Document for invoice, credit_note, contact,..", - "required":true, "type":"string" }, "related_object_id":{ "description": "uuid of the emails parent object.", - "required":true, "type":"string", "maxLength": 22, "minLength":22 }, "in_progress":{ "description": "Is set after an email has been scheduled for sending until it has been sent.", - "readonly":true, + "readOnly":true, "type":"boolean" }, "log":{ "description": "Logs error message when sending failed.", - "readonly":true, - "type":"text" + "readOnly":true, + "type":"string" }, "delivered_at":{ "description": "Date the email was delivered by SK. If set, the message cannot be edited anymore.", "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" }, "team_id":{ "description": "A team uuid taken from the related object. If set only the team and its parent teams can see the record.", - "readonly" :true, + "readOnly" :true, "type":"string", "maxLength": 22, "minLength":22 } }, @@ -154,10 +161,10 @@ "type": "string" } } }, { "rel": "attachments", - "href": "emails/{id}/attachments" + "href": "attachments?filter[related_object_ids]={id}" }, { "rel": "destroy", "href": "emails/{id}", "method": "DELETE" }, \ No newline at end of file