yaxc/swagger.yml
2021-05-13 19:07:30 +02:00

81 lines
2 KiB
YAML

swagger: "2.0"
info:
description: "YAxC - Yet Another Cross Clipboard"
version: "1.1.0"
title: "YAxC"
host: "yaxc.d2a.io"
basePath: "/"
tags:
- name: "{anywhere}"
description: "Public Clipboard Name"
schemes:
- "https"
- "http"
paths:
'/anywhere':
post:
tags:
- "{anywhere}"
summary: Post new clipboard data
consumes:
- 'text/plain'
produces:
- 'text/plain'
parameters:
- in: "body"
name: "contents"
description: "The content which should be uploaded"
required: true
schema:
type: string
default: "Hello World!"
- in: "query"
name: "secret"
description: "Encrypts the content with the password (server-side!)"
required: false
type: string
- in: "query"
name: "ttl"
description: "Waiting time after which the content is deleted"
required: false
type: string
responses:
"200":
description: "OK"
"406":
description: "Invalid Path"
"413":
description: "Body too large"
"416":
description: "TTL out of range"
"422":
description: "Invalid TTL. (Examples: 10s, 5m, 1h)"
"423":
description: "Encryption password was specified, but encryption is not enabled on the server"
"500":
description: "Intenral server error; e.g. Encryption failed (server-side)"
get:
tags:
- "{anywhere}"
summary: Get clipboard data
produces:
- 'text/plain'
parameters:
- in: "query"
name: "secret"
description: "Decrypts the contents with the password (server-side!)"
required: false
type: string
responses:
"200":
description: "OK"
"406":
description: "Invalid Path"
"423":
description: "Encryption password was specified, but encryption is not enabled on the server"