runnable swagger

This commit is contained in:
Bel LaPointe
2020-07-24 23:23:50 -06:00
parent 95555f46ec
commit 55d8cf5d43
15 changed files with 556 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
paths:
get:
tags:
- files
summary: "Fetch a file"
parameters:
- $ref: "#/components/parameters/path"
responses:
200:
content:
text/plain:
schema:
type: string
post:
tags:
- files
summary: "Provide or direct link to a file"
parameters:
- $ref: "#/components/parameters/path"
- $ref: "#/components/parameters/direct"
requestBody:
description: "If ?direct=true, then a direct link to the file, else a multi-part form"
content:
text/plain:
schema:
type: string
example: "http://imgur.com/img/mine.png"
application/x-www-form-urlencoded:
schema:
type: string
example: "password=123"
responses:
200:
$ref: "#/components/schemas/ok"
components:
parameters:
path:
$ref: "./swagger.yaml#/components/parameters/path"
direct:
name: direct
in: query
schema:
type: bool
schemas:
ok:
$ref: "./swagger.yaml#/components/schemas/ok"