-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
144 lines (144 loc) · 4.24 KB
/
openapi.yml
File metadata and controls
144 lines (144 loc) · 4.24 KB
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
openapi: "3.0.1"
info:
title: "pastebin"
version: "2023-12-25 17:09:00UTC"
description: "poor man pastebin - using aws free tier to host your personal pastebin"
contact:
name: socraticDev
url: https://www.linkedin.com/company/92752680/admin/feed/posts/
email: thesocraticdev@gmail.com
servers:
- url: "https://paste.socratic.dev"
tags:
- name: "pastes"
description: "some strings a user wants to save for later"
paths:
/paste/api/pastes:
get:
summary: Retrieve recent pastes' URL
description: |
open endpoint used to retrieve recent pastes (full URL) based on client's IP address
or a provided client id
operationId: "retrieve-recent-pastes"
tags:
- "pastes"
parameters:
- in: query
name: client_id
required: false
schema:
type: string
example: "workspace1"
description: |
self-picked string picked by the user to identify
themselves to Pastebin's
responses:
"200":
description: |
will always return a http 200 response. worse case it's
gonna be an empty array
content:
application/json:
schema:
type: array
items:
type: string
"500":
description: Internal Server Error. Something went wrong on the server.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Internal Server Error"
/paste/api:
get:
summary: Retrieve a paste by ID
description: open endpoint to retrieve a paste by ID
operationId: "retrieve-paste-by-id"
tags:
- "pastes"
parameters:
- in: query
name: id
required: true
schema:
type: string
example: "abc123"
description: The unique ID of the paste to retrieve
responses:
"200":
description: Successfully retrieved the paste
content:
application/json:
schema:
type: object
properties:
id:
type: string
example: "abc123"
content:
type: string
example: "my saved value"
"404":
description: Paste not found. The specified ID does not exist.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Paste not found"
"500":
description: Internal Server Error. Something went wrong on the server.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Internal Server Error"
post:
summary: Insert a new paste
description: public endpoint to save a paste
operationId: "insert-a-new-paste"
tags:
- "pastes"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
content:
type: string
example: "my saved value"
required:
- content
responses:
"201":
description: Successfully created a paste
content:
application/json:
schema:
type: object
properties:
id:
type: string
example: "abec123"
"500":
description: Internal Server Error. Something went wrong on the server.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Internal Server Error"
x-amazon-apigateway-importexport-version: "1.0"