-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi.yml
120 lines (114 loc) 路 2.68 KB
/
openapi.yml
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
openapi: 3.0.0
info:
version: '{{version}}'
description: 馃摳 website screenshots as a service
title: website-screenshot
contact:
name: Support
email: mail@tomio.fun
url: https://github.com/devtomio/website-screenshot/issues/new
license:
name: MIT/Apache-2.0
url: https://github.com/devtomio/website-screenshot#license
paths:
/:
get:
summary: The root route
tags:
- HTTP Routes
operationId: rootRoute
responses:
'200':
description: OK
content:
text/plain:
schema:
type: string
example: Hello, world!
'429':
description: Ratelimited
/screenshot:
post:
summary: Takes a screenshot of a website
tags:
- HTTP Routes
operationId: postScreenshot
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ScreenshotRequest'
description: Inventory item to add
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ScreenshotResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
'413':
description: Payload Too Large
'429':
description: Ratelimited
/s/{slug}:
get:
summary: Get a screenshot
parameters:
- in: path
name: slug
schema:
type: string
example: abcdefghijk
required: true
description: The slug of the screenshot
tags:
- HTTP Routes
responses:
'200':
description: OK
content:
image/png:
schema:
type: string
format: binary
'404':
description: Not Found
servers:
- url: '{{url}}'
components:
schemas:
ScreenshotRequest:
type: object
required:
- url
properties:
url:
type: string
format: uri
example: https://rust-lang.org
fullscreen:
type: boolean
example: false
check_nsfw:
type: boolean
example: false
dark_mode:
type: boolean
example: false
ScreenshotResponse:
type: object
properties:
slug:
type: string
example: abcdefghijk
path:
type: string
example: /s/abcdefghijk
metadata:
$ref: '#/components/schemas/ScreenshotRequest'