-
Notifications
You must be signed in to change notification settings - Fork 1
/
swagger.yaml
102 lines (101 loc) · 2.48 KB
/
swagger.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
openapi: 3.0.0
info:
title: Positive Group Admin Side
version: 1.0.0
servers:
- url: "{protocol}://localhost:{port}/{environment}"
description: Local Development Server
variables:
protocol:
enum:
- http
- https
default: http
port:
enum:
- "8000"
default: "8000"
environment:
default: api
enum:
- api
# security:
# - BearerAuth: []
paths:
/users:
get:
summary: Returns a list of users.
tags:
- Users
description: Optional extended description in Markdown.
security:
- BearerAuth: []
responses:
"401":
$ref: "#/components/responses/UnauthorizedError"
"200":
description: Expected response to a valid request
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/User"
components:
schemas:
User:
type: object
properties:
_id:
description: id of the user
type: string
firstName:
description: first name of the user
type: string
lastName:
description: last name of the user
type: string
birthDate:
description: birthdate of the user
type: string
gender:
description: gender of the user
type: string
job:
description: job of the user
type: string
email:
description: email of the user
type: string
password:
description: password of the user
type: string
isActivated:
description: is the account activated
type: boolean
invitees:
description: users invited by this user
type: array
inviter:
description: the user who invited user, null if none
type: string
bonus:
description: bonus cumulated by the user
type: string
image:
description: image of the user
type: string
phone:
description: phone number of the user
type: string
location:
description: location by governorate of the user
type: string
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
responses:
UnauthorizedError:
description: Access token is missing or invalid