-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi-customers.yaml
More file actions
86 lines (86 loc) · 1.83 KB
/
Copy pathopenapi-customers.yaml
File metadata and controls
86 lines (86 loc) · 1.83 KB
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
openapi: 3.0.0
info:
title: FakeStoreNet User & Auth API
version: "1.0.0"
servers:
- url: https://api.fakestorenet.local
paths:
/users:
post:
summary: Register a new user
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NewUser'
responses:
'201':
description: User created
content:
application/json:
schema:
$ref: '#/components/schemas/User'
/auth/login:
post:
summary: Authenticate user and return JWT
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Credentials'
responses:
'200':
description: Authentication successful
content:
application/json:
schema:
$ref: '#/components/schemas/AuthResponse'
components:
schemas:
NewUser:
type: object
properties:
username:
type: string
email:
type: string
password:
type: string
firstName:
type: string
lastName:
type: string
Credentials:
type: object
properties:
username:
type: string
password:
type: string
User:
type: object
properties:
id:
type: integer
username:
type: string
email:
type: string
name:
$ref: '#/components/schemas/Name'
Name:
type: object
properties:
firstName:
type: string
lastName:
type: string
AuthResponse:
type: object
properties:
token:
type: string
expiresIn:
type: integer