This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
139 lines (133 loc) · 3.58 KB
/
openapi.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
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
openapi: 3.0.0
info:
title: Developer Utility Tools
version: 1.0.0
description: A collection of utility endpoints for various common tasks for mainly developers usage.
paths:
/uuid:
get:
summary: Generate a UUID
responses:
'200':
description: A UUID string
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
/color-conversion:
get:
summary: It will get color format and a color to convert between hex to rgb.
parameters:
- in: query
name: color
schema:
type: string
required: true
description: The color code that wanted to convert
- in: query
name: format
schema:
type: string
required: true
description: The target color format (hex or rgb)
responses:
'200':
description: The converted color code
content:
application/json:
schema:
type: object
properties:
result:
type: string
'400':
description: Missing or invalid parameters
/timestamp-conversion:
get:
summary: Convert a Unix timestamp to a formatted date/time string
parameters:
- in: query
name: timestamp
schema:
type: string
required: true
description: The Unix timestamp to convert
- in: query
name: format
schema:
type: string
required: true
description: The format string for the output. It must be in python date formatting style.
responses:
'200':
description: The formatted time
content:
application/json:
schema:
type: object
properties:
formatted_time:
type: string
'400':
description: Missing or invalid parameters
/jwt-generate:
post:
summary: Generate a JWT token
parameters:
- in: query
name: JWT_SECRET
schema:
type: string
required: true
description: The secret key used for token generation
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: A JWT token
content:
application/json:
schema:
type: object
properties:
token:
type: string
'400':
description: Missing payload or secret key
/jwt-verify:
post:
summary: Verify and decode a JWT token
parameters:
- in: query
name: JWT_SECRET
schema:
type: string
required: true
description: The secret key used for token verification
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
token:
type: string
responses:
'200':
description: Decoded token data
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Missing token or secret key