-
Notifications
You must be signed in to change notification settings - Fork 5
/
swagger.yaml
163 lines (162 loc) · 3.73 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
openapi: "3.0.0"
info:
version: 1.0.0
title: Employee Api
license:
name: Apache License
contact:
name: Arun Gopalpuri
email: [email protected]
servers:
- url: http://localhost:8080/employee-api
paths:
/:
post:
summary: Create Employee
operationId: createEmployee
tags:
- employee
requestBody:
description: Employee
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
responses:
'201':
description: created employee successfully
'400':
description: bad request
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeApiError'
/{employeeId}:
get:
description: Get Employee Details
operationId: getEmployee
tags:
- "employee"
parameters:
- name: employeeId
in: path
description: employee id to retrieve
required: true
schema:
type: integer
format: int32
responses:
'200':
description: Employee Details
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
'404':
description: Employee not found
put:
summary: Update Employee Details
operationId: updateEmployee
tags:
- employee
parameters:
- name: employeeId
in: path
description: employee id to update
required: true
schema:
type: integer
format: int32
requestBody:
description: Employee Details
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEmployee'
responses:
'200':
description: updated employee details successfully
'400':
description: bad request
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeApiError'
delete:
summary: Delete an Employee
operationId: deleteEmployee
tags:
- employee
parameters:
- name: employeeId
in: path
description: employee id to delete
required: true
schema:
type: integer
format: int32
responses:
'410':
description: deleted employee successfully
components:
schemas:
Address:
properties:
addressLine1:
type: string
addressLine2:
type: string
city:
type: string
state:
type: string
zipCode:
type: string
Employee:
properties:
employeeId:
type: string
type:
type: string
enum: [Manager, Associate]
firstName:
type: string
middleName:
type: string
lastName:
type: string
passportNumber:
type: string
position:
type: string
addresses:
type: array
items:
$ref: "#/components/schemas/Address"
UpdateEmployee:
properties:
type:
type: string
enum: [Manager, Associate]
firstName:
type: string
middleName:
type: string
lastName:
type: string
passportNumber:
type: string
position:
type: string
addresses:
type: array
items:
$ref: "#/components/schemas/Address"
EmployeeApiError:
properties:
executionId:
type: string
errorMessage:
type: string