This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenAPI.json
110 lines (110 loc) · 2.32 KB
/
OpenAPI.json
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
{
"openapi": "3.0.3",
"info": {
"title": "Snippeter",
"description": "Service for sharing code snippets",
"contact": {
"name": "NanamiNakano",
"url": "https://www.notkiller.moe",
"email": "[email protected]"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.1.0"
},
"servers": [
{
"url": "http://localhost",
"description": "Dev"
},
{
"url": "https://snippets.notkiller.moe",
"description": "Production"
}
],
"components": {
"schemas": {
"Snippet": {
"type": "object",
"properties": {
"content": {
"type": "string"
}
}
}
}
},
"paths": {
"/": {
"get": {
"description": "Main Web UI",
"responses": {
"200": {
"description": "Web UI",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
}
}
},
"post": {
"description": "Create a new snippet",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/Snippet"
}
}
}
},
"responses": {
"302": {
"description": "Redirect to the snippet",
"headers": {
"Location": {
"description": "Snippet's location",
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/p/{id}": {
"get": {
"description": "Snippet url",
"responses": {
"200": {
"description": "Snippet",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
},
"404": {
"description": "Snippet not found",
"content": {
"text/html": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
}
}