-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocs.yml
120 lines (115 loc) · 2.84 KB
/
docs.yml
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
openapi: 3.0.0
info:
title: User Management
description: |
VAPI for managing users. Provides the ability to view, edit, and unsubscribe users.
This VAPI depends on the 'Auth BaseAPI'
version: "1.0.0"
paths:
/get-user-info:
get:
summary: Retrieve user information
parameters:
- in: query
name: user_id
schema:
type: string
required: true
description: The ID of the user to retrieve
responses:
'200':
description: User information retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/UserInfo'
'400':
description: Missing user-id
'405':
description: Method not allowed
/delete-user:
delete:
summary: Delete a user
parameters:
- in: header
name: Authorization
required: true
schema:
type: string
description: Bearer token required to authorize the request
- in: body
name: body
required: true
schema:
type: object
properties:
should_soft_delete:
type: boolean
responses:
'200':
description: Request processed successfully
'400':
description: Missing should_soft_delete
'401':
description: Unauthorized
'405':
description: Method not allowed
/update-user:
patch:
summary: Update user
parameters:
- in: header
name: Authorization
required: true
schema:
type: string
description: Bearer token required to authorize the request
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserRequest'
responses:
'200':
description: User updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/UserInfo'
'400':
description: No data to update
'401':
description: Unauthorized
'405':
description: Method not allowed
components:
schemas:
UserInfo:
type: object
properties:
user_name:
type: string
full_name:
type: string
avatar_url:
type: string
email:
type: string
phone:
type: string
UpdateUserRequest:
type: object
properties:
email:
type: string
phone:
type: string
password:
type: string
user_name:
type: string
full_name:
type: string
avatar_url:
type: string