From 93a60a6373115384ba69ce19b6a8c44ea59bbad0 Mon Sep 17 00:00:00 2001 From: itsbr0dyy <1500forlifejahh@gmail.com> Date: Sat, 30 May 2026 21:03:49 -0700 Subject: [PATCH] docs: add hastebin api --- public/swagger.yaml | 68 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/public/swagger.yaml b/public/swagger.yaml index e01743e..a15a3fd 100644 --- a/public/swagger.yaml +++ b/public/swagger.yaml @@ -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