Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions public/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,74 @@ paths:
schema:
$ref: '#/components/schemas/RateLimitResponse'

/documents:
post:
servers:
- url: https://h.potat.app
summary: Create a new haste
tags:
- Haste
requestBody:
required: true
content:
text/plain:
schema:
type: string
example: potato
text/markdown:
schema:
type: string
example: "# potat"
application/json:
schema:
type: object
example:
message: potato
responses:
'200':
description: Haste created successfully
content:
application/json:
schema:
type: object
properties:
key:
type: string
example: abc123
'400':
description: Error parsing request
content:
text/plain:
schema:
type: string
example: Error parsing form
'411':
description: Empty request body
content:
text/plain:
schema:
type: string
example: Length required
'415':
description: Unsupported media type
content:
text/plain:
schema:
type: string
example: Invalid media type
'429':
description: Rate Limit Reached
content:
application/json:
schema:
$ref: '#/components/schemas/RateLimitResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'

/leaderboard:
get:
summary: Get the leaderboard
Expand Down
Loading