diff options
author | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2022-04-25 16:52:57 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2022-04-25 16:52:57 +0200 |
commit | a97f1a5eb6649e93bfd6584ed590e37c1290755f (patch) | |
tree | fe5858e3d1f23ee991566db6c0995604b0b40910 /lib/JWebmail/Model/ReadMails/schema.json | |
parent | 5c3fa491eebc690fbac8a963996a0244882813c7 (diff) |
Refactored ReadMails into a role
Diffstat (limited to 'lib/JWebmail/Model/ReadMails/schema.json')
-rw-r--r-- | lib/JWebmail/Model/ReadMails/schema.json | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/lib/JWebmail/Model/ReadMails/schema.json b/lib/JWebmail/Model/ReadMails/schema.json new file mode 100644 index 0000000..b63a5eb --- /dev/null +++ b/lib/JWebmail/Model/ReadMails/schema.json @@ -0,0 +1,83 @@ +{ + "$schema": "http://json-schema.org/schema#", + "definitions": { + "count": { + "type": "object", + "properties": { + "new": {"type": "integer", "minimum": 0}, + "size": {"type": "integer", "minimum": 0}, + "count": {"type": "integer", "minimum": 0}, + "unread": {"type": "integer", "minimum": 0} + }, + "required": ["count"], + "additionalProperties": false + }, + "folders": { + "type": "array", + "items": { + "type": "string" + } + }, + "mail_addrs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": {"type": "string"}, + "address": {"type": "string"} + }, + "required": ["address"] + }, + "minItems": 1 + }, + "mail_head": { + "type": "object", + "properties": { + "content_type": {"type": "string"}, + "date": {"type": "string"}, + "cc": {"$ref": "#/definitions/mail_addrs"}, + "bcc": {"$ref": "#/definitions/mail_addrs"}, + "to": {"$ref": "#/definitions/mail_addrs"}, + "from": {"$ref": "#/definitions/mail_addrs"}, + "subject": {"type": "string"} + }, + "required": ["date", "from"] + }, + "head_list": { + "type": "array", + "items": { + "$ref": "#/definitions/mail_head" + } + }, + "mail_body": { + "anyOf": [ + {"type": "string"}, + { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "head": {"$ref": "#/definitions/mail_head"}, + "body": {"$ref": "#/definitions/mail_body"} + } + } + }, + { + "ref": "#/definitions/mail" + } + ] + }, + "mail": { + "type": "object", + "properties": { + "new": {"type": "boolean"}, + "mid": {"type": "string"}, + "size": {"type": "integer", "minimum": 0}, + "head": {"$ref": "#/definitions/mail_head"}, + "body": {"$ref": "#/definitions/mail_body"} + }, + "required": ["mid"] + } + } +} |