-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenAPI.yaml
121 lines (116 loc) · 3.43 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
openapi: 3.0.3
info:
title: Password Management Service
description: API for managing passwords, including creating, retrieving, and updating passwords for specific services.
version: 1.0.0
servers:
- url: 'http://localhost:8080'
paths:
/password:
get:
summary: Get all passwords
description: Retrieve a list of all stored passwords.
responses:
'200':
description: A list of passwords
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Password'
post:
summary: Create a new password
description: Create a new password for a specified service.
parameters:
- in: query
name: serviceName
required: true
description: Name of the service for which the password is being created
schema:
type: string
- in: query
name: passwordValue
required: false
description: Optional password value. If not provided, a generated password will be created.
schema:
type: string
responses:
'200':
description: The created password
content:
application/json:
schema:
$ref: '#/components/schemas/Password'
/password/{serviceName}:
get:
summary: Get a password by service name
description: Retrieve a password for a specified service name.
parameters:
- in: path
name: serviceName
required: true
description: Name of the service to retrieve the password for
schema:
type: string
responses:
'200':
description: The password for the specified service
content:
application/json:
schema:
$ref: '#/components/schemas/Password'
'404':
description: Password not found for the specified service name
put:
summary: Update a password
description: Update the password for a specified service name.
parameters:
- in: path
name: serviceName
required: true
description: Name of the service for which the password should be updated
schema:
type: string
- in: query
name: passwordValue
required: false
description: Optional new password value. If not provided, a new generated password will be created.
schema:
type: string
responses:
'200':
description: The updated password
content:
application/json:
schema:
$ref: '#/components/schemas/Password'
'404':
description: Password not found for the specified service name
components:
schemas:
Password:
type: object
properties:
id:
type: integer
example: 1
passwordValue:
type: string
example: "sµCt0?z5KZFf"
serviceName:
type: string
example: "exampleService"
createdAt:
type: string
format: date-time
example: "2024-10-12T17:27:41.607Z"
PasswordRequest:
type: object
properties:
passwordValue:
type: string
example: "w6'fm[O‰kgqA!"
serviceName:
type: string
example: "exampleService"