-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
134 lines (127 loc) · 4.39 KB
/
swagger.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
openapi: 3.1.0
info:
version: "1.0.0"
title: Glue
description: >
A sample API that returns a CLI response showing the active discussion threads in some SFW 4channel
boards using the [4chan-API](https://github.com/4chan/4chan-API)
contact:
name: Dominick Peluso
license:
name: MIT
licenseUrl: http://opensource.org/licenses/MIT
servers:
- url: https://glue-js.dominick.cc
description: Python implementation (hosted)
- url: https://glue-go.dominick.cc
description: Golang implementation (hosted)
- url: https://glue-js.dominick.cc
description: Javascript implementation (hosted)
- url: http://localhost:8001
description: Python implementation
- url: http://localhost:8002
description: Golang implementation
- url: http://localhost:8003
description: Javascript implementation
- url: http://localhost:8011
description: Python implementation (mocked)
- url: http://localhost:8012
description: Golang implementation (mocked)
- url: http://localhost:8013
description: Javascript implementation (mocked)
paths:
/:
get:
summary: Get index message
description: Returns the index message
produces:
- text/plain
- text/html
parameters:
- name: user-agent
in: header
description: The user-agent to use (must start with 'curl')
required: true
type: string
pattern: ^curl
example: curl/7.68.0
responses:
200:
description: Index response
content:
text/plain:
schema:
type: string
example: You should call /<board>/<page> to get the catalog of a board.
400:
$ref: '#/components/responses/BadRequest'
/{board}/{page}:
get:
summary: Get a list of recent threads
description: Returns a list of recent threads on a particular board and page.
produces:
- text/plain
- text/html
parameters:
- name: user-agent
in: header
description: The user-agent to use (must start with 'curl')
required: true
type: string
pattern: ^curl
example: curl/7.68.0
- name: board
in: path
description: The supported SFW 4channel boards to get the catalog response from.
required: true
type: string
enum: [po, g, fa, mu, v]
default: po
- name: page
in: path
description: The page number of the catalog.
required: false
default: 1
type: integer
format: int32
responses:
200:
description: CLI response showing the thread titles and their reply counts.
content:
text/plain:
schema:
type: string
example: |
Page 2:
- I made this little puzzle box called a soma cube for my girlfrie... (6 replies)
- /scipo/phrenics (4 replies)
- PAPER PLANES REFUELED (142 replies)
- I'm making an effigy of a McDonald's nightmare golem (96 replies)
- Low Poly Toucan Papercraft (3 replies)
- Is there a term for this type of 3D models? I love this one, I&#... (8 replies)
- The Changs are at it again (25 replies)
- Paper Cutting General -1 (6 replies)
- What kind of paper plane is this? (14 replies)
- The lack of a good /po/+/ck/ thread is absurd...<br><br>So here ... (4 replies)
- Simple Origami ideas for Potential Soul Mate (24 replies)
- Engagement Proposal Origami (4 replies)
- Making some paper stars. (2 replies)
- RPG/Wargame Terrain Papercrafts? (3 replies)
- Chamoo323's Archives (16 replies)
400:
$ref: '#/components/responses/BadRequest'
components:
responses:
BadRequest:
description: Bad request not from curl.
content:
text/html:
schema:
type: string
example: |
<html>
<div>
<p>This API returns text-based responses intended to be used with curl.</p>
<p>Try "curl %s".</p>
</div>
</html>