mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
Added entries for image proxying and registering
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
7064b8c66d
commit
3969ef3259
1 changed files with 65 additions and 0 deletions
|
@ -73,6 +73,27 @@ paths:
|
||||||
Set-Cookie:
|
Set-Cookie:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
/auth/register:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- auth
|
||||||
|
summary: Trying to register a new user via email
|
||||||
|
operationId: registerEmail
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/EmailLogin'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The user was successfully registered and logged-in afterwards.
|
||||||
|
headers:
|
||||||
|
Set-Cookies:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
'409':
|
||||||
|
description: There is already a user account with the given email address.
|
||||||
/me:
|
/me:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -528,6 +549,38 @@ paths:
|
||||||
content:
|
content:
|
||||||
text/plain:
|
text/plain:
|
||||||
example: 1570921051959
|
example: 1570921051959
|
||||||
|
/media/proxy:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- media
|
||||||
|
summary: Returns a proxied url for a given image url
|
||||||
|
description: Returns in exchange for an image-url the url for a proxied version of the image.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: An object containing the proxied url
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
"$ref": "#/components/schemas/ImageProxyResponse"
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
description: An object containing the original image url
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
"$ref": "#/components/schemas/ImageProxyRequest"
|
||||||
|
/media/upload:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- media
|
||||||
|
summary: Uploads an image to the backend storage
|
||||||
|
description: Uploads an image to be processed by the backend.
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
description: The binary image to upload.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: The image was uploaded successfully.
|
||||||
/config:
|
/config:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -582,6 +635,18 @@ components:
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: The new display name of the user.
|
description: The new display name of the user.
|
||||||
|
ImageProxyRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
src:
|
||||||
|
type: string
|
||||||
|
description: The url of the image that should be processed by the image proxy.
|
||||||
|
ImageProxyResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
src:
|
||||||
|
type: string
|
||||||
|
description: The url of the provied version of the image.
|
||||||
Config:
|
Config:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in a new issue