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 1
/
Copy pathswagger.yaml
145 lines (140 loc) · 3.08 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
openapi: "3.0.0"
info:
version: 1.0.0
title: GPT agenda
license:
name: MIT
servers:
- url: https://gpt-agenda.fordemo.app/api
paths:
/items:
get:
summary: List all items in the agenda
operationId: listItems
tags:
- items
responses:
'200':
description: An array of items
content:
application/json:
schema:
$ref: "#/components/schemas/Items"
post:
summary: Create an item in the agenda
operationId: createItems
tags:
- items
requestBody:
description: Item to add to the agenda
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateItem"
responses:
'201':
description: Created
/items/{id}:
get:
summary: Get an item by id
operationId: getItemById
tags:
- items
parameters:
- name: id
in: path
required: true
description: The id of the item to retrieve
schema:
type: string
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
$ref: "#/components/schemas/Item"
'404':
description: Item not found
patch:
summary: Update an item by id
operationId: updateItemById
tags:
- items
parameters:
- name: id
in: path
required: true
description: The id of the item to update
schema:
type: string
requestBody:
description: Item to update
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateItem"
responses:
'200':
description: Updated
content:
application/json:
schema:
$ref: "#/components/schemas/Item"
'404':
description: Item not found
delete:
summary: Delete an item by id
operationId: deleteItemById
tags:
- items
parameters:
- name: id
in: path
required: true
description: The id of the item to delete
schema:
type: string
responses:
'204':
description: Deleted
'404':
description: Item not found
components:
schemas:
Item:
type: object
required:
- id
- date
- text
properties:
id:
type: string
date:
type: string
text:
type: string
Items:
type: array
items:
$ref: "#/components/schemas/Item"
CreateItem:
type: object
required:
- date
- text
properties:
date:
type: string
text:
type: string
UpdateItem:
type: object
properties:
date:
type: string
text:
type: string