-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostAPI.yaml
More file actions
43 lines (41 loc) · 1.23 KB
/
postAPI.yaml
File metadata and controls
43 lines (41 loc) · 1.23 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
openapi: 3.0.3
info:
title: DummyJSON Authentication API
version: "1.0.0"
description: API for user authentication and login
servers:
- url: https://dummyjson.com
paths:
/auth/login:
post:
summary: User login
description: Login with username and password to receive an authentication token.
operationId: loginUser
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
example: emilys
password:
type: string
format: password
example: emilyspass
expiresInMins:
type: integer
description: Expiry time in minutes for the token (optional, defaults to 60).
example: 30
required:
- username
- password
responses:
'200':
description: Successfully authenticated
'400':
description: Invalid request (e.g. missing username or password)
'401':
description: Authentication failed (invalid username or password)