-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathws.json
64 lines (64 loc) · 2.07 KB
/
ws.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "Applifting Blog Engine fullstack exercise websocket specification",
"required": ["changeType"],
"properties": {
"changeType": {
"$id": "#/properties/changeType",
"type": "string",
"title": "Notification type",
"default": "",
"examples": ["commentCreated"],
"enum": ["commentCreated", "commentUpVoted", "commentDownVoted"]
},
"comment": {
"$id": "#/properties/comment",
"type": "object",
"title": "The Comment Schema",
"required": ["commentId", "author", "content", "createdAt", "score"],
"properties": {
"commentId": {
"$id": "#/properties/comment/properties/commentId",
"type": "string",
"title": "Unique identifier of te comment",
"default": "",
"examples": ["4d34dffa-c5d5-4af3-afcf-2c60c862ade6"]
},
"author": {
"$id": "#/properties/comment/properties/author",
"type": "string",
"title": "Author of the comment",
"default": "",
"examples": ["Petr"],
"pattern": "^(.*)$"
},
"content": {
"$id": "#/properties/comment/properties/content",
"type": "string",
"title": "Content of the comment",
"default": "",
"examples": ["I like trains"],
"pattern": "^(.*)$"
},
"createdAt": {
"$id": "#/properties/comment/properties/createdAt",
"type": "string",
"title": "ISO8601 formatted date of when the comment was created",
"default": "",
"examples": ["2020-02-18T16:24:47.832013"],
"format": "date-time"
},
"score": {
"$id": "#/properties/comment/properties/score",
"type": "integer",
"title": "Score of the comment",
"default": 0,
"examples": [0]
}
}
}
}
}