-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yaml
187 lines (172 loc) · 4.21 KB
/
api.yaml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
openapi: 3.0.3
info:
title: Netvork vlog - OpenAPI 3.0
description: |-
This is the OpenAPI 3.0 specification for a vlog app name **Network**
contact:
email: [email protected]
version: 1.0.0
servers:
- url: http://127.0.0.1:8080/api
tags:
- name: user
description: Access user data and manage vlog
- name: test
description: Manage user information and post
paths:
/user:
put:
tags:
- user
summary: Edit post
description: Update an existing post with Id
requestBody:
description: Update an existent post in vlog
content:
application/json:
schema:
$ref: '#/components/schemas/post_update'
application/xml:
schema:
$ref: '#/components/schemas/post_update'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/post_update'
required: true
responses:
'200':
description: Successful operation
'400':
description: Operation failed
post:
tags:
- user
summary: Add a new post
description: Add a new post to vlog
requestBody:
description: Create a new post
content:
application/json:
schema:
$ref: '#/components/schemas/post'
application/xml:
schema:
$ref: '#/components/schemas/post'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/post'
required: true
responses:
'200':
description: Successful operation
'400':
description: Operation failed
get:
tags:
- user
summary: Acces vlog data
description: Access data about current user and posts
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/data'
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/data'
'400':
description: Invalid status value
delete:
tags:
- user
summary: delete post
description: ''
parameters:
- name: id
in: query
description: ID post to be deleted
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
/test:
put:
tags:
- test
summary: Manage following
description: Manage following and unfollowing of users
parameters:
- name: id
in: query
description: Id of user following or unfollowing
required: true
schema:
type: integer
example: 9
responses:
'200':
description: Successful operation
'400':
description: Coudn't process request
components:
schemas:
post_update:
type: object
properties:
id:
type: integer
format: int64
example: 10
postname:
type: string
example: post title
caption:
type: string
example: new post caption
photo:
type: string
format: binary
xml:
name: post_update
post:
type: object
properties:
postname:
type: string
example: post title
caption:
type: string
example: new post caption
photo:
type: string
format: binary
xml:
name: post
data:
type: object
properties:
uid:
type: integer
example: 7
username:
type: string
example: John wick
posts:
type: array
items:
type: object
users:
type: array
items:
type: object
xml:
name: data