56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
paths:
|
|
get:
|
|
tags:
|
|
- files
|
|
summary: "Fetch a file"
|
|
parameters:
|
|
- $ref: "#/components/parameters/path"
|
|
- $ref: "#/components/parameters/namespacePath"
|
|
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/namespacePath"
|
|
- $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"
|
|
|
|
namespacePath:
|
|
$ref: "./swagger.yaml#/components/parameters/namespacePath"
|
|
|
|
direct:
|
|
name: direct
|
|
in: query
|
|
schema:
|
|
type: bool
|
|
|
|
schemas:
|
|
ok:
|
|
$ref: "./swagger.yaml#/components/schemas/ok"
|