generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
users.yml
151 lines (139 loc) · 3.29 KB
/
users.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
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
openapi: 3.0.0
info:
title: Users API
version: 1.0.0
description: API for user management and authentication
paths:
/v1/users/me:
get:
summary: Get current user information
tags:
- Users
security:
- ApiKeyAuth: []
responses:
'200':
description: User information retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/UserResponse'
'401':
$ref: '#/components/responses/Unauthorized'
patch:
summary: Update current user information
tags:
- Users
security:
- ApiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserUpdate'
responses:
'200':
description: User information updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/UserResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
components:
schemas:
UserUpdate:
type: object
properties:
name:
type: string
description: The updated name of the user
UserResponse:
type: object
properties:
id:
type: string
format: uuid
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
status:
type: string
enum: [ACTIVE, INACTIVE]
name:
type: string
email:
type: string
format: email
credits_balance:
type: integer
description: The user's current credit balance
Pagination:
type: object
properties:
total_pages:
type: integer
current_page:
type: integer
items_per_page:
type: integer
ErrorResponse:
type: object
properties:
status:
type: integer
message:
type: string
responses:
BadRequest:
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
parameters:
PageParam:
in: query
name: page
schema:
type: integer
default: 1
minimum: 1
description: Page number to retrieve
ItemsPerPageParam:
in: query
name: items_per_page
schema:
type: integer
default: 20
minimum: 1
description: Number of items to return per page
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key