-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemployees.yaml
97 lines (94 loc) · 2.36 KB
/
employees.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
openapi: 3.0.0
info:
title: Employees
version: '1.0'
servers: []
paths:
'/employees':
post:
summary: Create employee
tags: []
parameters:
- in: header
name: correlation-id
schema:
type: string
required: true
description: Request correlation ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
responses:
'200':
description: Details for employee id in request
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
'/employees/{employeeId}':
parameters:
- in: path
name: employeeId
required: true
description: The unique identifier of the employee
schema:
type: integer
get:
summary: Fetch employee details by ID
description: Retrieves detailed information about a specific employee
responses:
'200':
description: Employee details retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
'404':
description: Employee not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
'/employees/active':
get:
summary: Get all active employees
description: Retrieves a list of all currently active employees
parameters:
- in: header
name: department
schema:
type: string
required: false
description: Filter by department
responses:
'200':
description: List of active employees retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Employee'
components:
schemas:
Employee:
title: Employee
type: object
required:
- id
- name
properties:
id:
type: integer
name:
type: string
department:
type: string
designation:
type: string