documented extension endpoint

This commit is contained in:
Jan Friedli 2020-07-13 08:21:08 +02:00
parent 2c1bc2f05a
commit 77269a82e6
No known key found for this signature in database
GPG key ID: F945FA2FCA30549D
3 changed files with 20 additions and 4 deletions

View file

@ -26,8 +26,6 @@ parameters:
responses: responses:
200: 200:
description: "An object containing all info about the cleaned file" description: ""
schema:
$ref: '#/definitions/UploadResponse'
404: 404:
description: "The filename, key or secret are wrong" description: "The filename, key or secret are wrong or the link is too old and the file has been deleted"

17
matweb/oas/extension.yml Normal file
View file

@ -0,0 +1,17 @@
---
tags:
- "Supported Extensions"
summary: 'Returns a list of all supported file extensions'
consumes:
- "application/json"
produces:
- "application/json"
responses:
200:
description: "A list of all supported file extensions"
schema:
type: "array"
items:
type: "string"
example: ".jpeg"

View file

@ -160,5 +160,6 @@ class APIBulkDownloadCreator(Resource):
class APISupportedExtensions(Resource): class APISupportedExtensions(Resource):
@swag_from('./oas/extension.yml')
def get(self): def get(self):
return utils.get_supported_extensions() return utils.get_supported_extensions()