-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathopenapi_chatgpt.yaml
126 lines (126 loc) · 3.25 KB
/
openapi_chatgpt.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
openapi: 3.0.0
info:
title: Chicken Tracker API
version: 1.0.0
description: An API for tracking chickens and their eggs
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
paths:
/chickens:
get:
summary: Get a list of all chickens
responses:
'200':
description: A list of chickens
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Chicken'
example:
- id: 1
name: Henrietta
eggCount: 7
- id: 2
name: Greta
eggCount: 3
post:
summary: Add a new chicken to the list
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Chicken'
example:
id: 3
name: Rosie
eggCount: 0
responses:
'201':
description: The newly created chicken
content:
application/json:
schema:
$ref: '#/components/schemas/Chicken'
example:
id: 3
name: Rosie
eggCount: 0
/chickens/{id}:
get:
summary: Get a chicken by ID
parameters:
- name: id
in: path
required: true
description: The ID of the chicken to retrieve
schema:
type: integer
responses:
'200':
description: The chicken with the specified ID
content:
application/json:
schema:
$ref: '#/components/schemas/Chicken'
example:
id: 1
name: Henrietta
eggCount: 7
put:
summary: Update a chicken by ID
parameters:
- name: id
in: path
required: true
description: The ID of the chicken to update
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Chicken'
example:
id: 1
name: Henrietta
eggCount: 8
responses:
'200':
description: The updated chicken
content:
application/json:
schema:
$ref: '#/components/schemas/Chicken'
example:
id: 1
name: Henrietta
eggCount: 8
delete:
summary: Delete a chicken by ID
parameters:
- name: id
in: path
required: true
description: The ID of the chicken to delete
schema:
type: integer
responses:
'204':
description: The chicken was successfully deleted
components:
schemas:
Chicken:
type: object
properties:
id:
type: integer
description: The unique ID of the chicken
name:
type: string
description: The name of the chicken
eggCount:
type: integer
description: The number of eggs laid by the chicken