start new swagger

This commit is contained in:
breel
2020-08-09 19:03:25 -06:00
parent 02c5d795cf
commit f11261f0da
11 changed files with 275 additions and 2 deletions

View File

@@ -0,0 +1,55 @@
paths:
get:
tags:
- files
summary: "Fetch a file"
parameters:
- $ref: "#/components/parameters/path"
- $ref: "#/components/parameters/namespace"
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/namespace"
- $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"
namespace:
$ref: "./swagger.yaml#/components/parameters/namespacePath"
direct:
name: direct
in: query
schema:
type: bool
schemas:
ok:
$ref: "./swagger.yaml#/components/schemas/ok"