forked from Eugene-Fed/api-json-mocker-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
100 lines (100 loc) · 2.52 KB
/
schema.json
File metadata and controls
100 lines (100 loc) · 2.52 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
"openapi": "3.0.3",
"info": {
"title": "Mentors and Postcards API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://my-json-server.typicode.com/devmanorg/congrats-mentor"
}
],
"paths": {
"/mentors": {
"get": {
"summary": "Get all mentors",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MentorsResponse"
}
}
}
}
}
}
},
"/postcards": {
"get": {
"summary": "Get all postcards",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostcardsResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Mentor": {
"type": "object",
"properties": {
"id": {"type": "integer"},
"name": {
"type": "object",
"properties": {
"first": {"type": "string"},
"second": {"type": "string"}
},
"required": ["first", "second"]
},
"tg_username": {"type": "string"},
"tg_chat_id": {"type": "integer"},
"bday": {"type": "string", "format": "date"}
},
"required": ["id", "name", "tg_username", "tg_chat_id"]
},
"MentorsResponse": {
"type": "object",
"properties": {
"mentors": {
"type": "array",
"items": {"$ref": "#/components/schemas/Mentor"}
}
},
"required": ["mentors"]
},
"Postcard": {
"type": "object",
"properties": {
"id": {"type": "integer"},
"holidayId": {"type": "string"},
"name_ru": {"type": "string"},
"body": {"type": "string"}
},
"required": ["id", "holidayId", "name_ru", "body"]
},
"PostcardsResponse": {
"type": "object",
"properties": {
"postcards": {
"type": "array",
"items": {"$ref": "#/components/schemas/Postcard"}
}
},
"required": ["postcards"]
}
}
}
}