-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
93 lines (93 loc) · 2.33 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
openapi: "3.0.0"
paths:
/v1/auth/logout:
get:
operationId: "AuthController_logout"
summary: ""
description: "Logs out user and deactivates it in the system."
parameters: []
responses:
200:
description: ""
tags:
- "Authorization"
/v1/auth/token:
post:
operationId: "AuthController_authorizeUser"
summary: ""
description: "Should be called by API consumers (Web or Mobile App) to exchange Google OAuth token for JWT token,\n assuming that Google OAuth flow has already happened in browser.\n This is a part of authorization flow for any FE application that want to use this API."
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AuthorizeUserRequestBody"
responses:
200:
description: ""
content:
application/json:
schema:
$ref: "#/components/schemas/AuthorizeUserResponse"
tags:
- "Authorization"
/v1/auth/link:
get:
operationId: "AuthController_redirectToGoogleAuth"
summary: ""
description: "Returns redirect link to Google OAuth authorization."
parameters: []
responses:
200:
description: ""
tags:
- "Authorization"
info:
title: "Nodejs Starter API"
description: ""
version: "1.0"
contact: {}
tags: []
servers: []
components:
securitySchemes:
Authorization:
scheme: "bearer"
bearerFormat: "JWT"
type: "http"
schemas:
AuthorizeUserRequestBody:
type: "object"
properties:
accessToken:
type: "string"
required:
- "accessToken"
AuthorizeUserResponseUser:
type: "object"
properties:
id:
type: "string"
givenName:
type: "string"
familyName:
type: "string"
nullable: true
picture:
type: "string"
required:
- "id"
- "givenName"
- "familyName"
- "picture"
AuthorizeUserResponse:
type: "object"
properties:
accessToken:
type: "string"
user:
$ref: "#/components/schemas/AuthorizeUserResponseUser"
required:
- "accessToken"
- "user"