mat2-web/matweb/oas/upload.yml

44 lines
1.2 KiB
YAML
Raw Normal View History

2020-07-13 08:01:07 +02:00
---
tags:
- "File Upload (Metadata removal)"
summary: 'Upload a single file which will be cleaned from metadata'
2020-07-14 15:28:08 +02:00
requestBody:
2020-07-13 08:01:07 +02:00
description: "The file that will be cleaned from metadata. Note that the file must be base64 encoded"
required: true
2020-07-14 15:28:08 +02:00
content:
application/json:
schema:
type: "object"
properties:
file_name:
type: "string"
example: 'my_example.jpg'
file:
type: "string"
example: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='
2020-07-13 08:01:07 +02:00
responses:
2020-07-13 08:34:18 +02:00
201:
2020-07-13 08:01:07 +02:00
description: "An object containing all info about the cleaned file"
2020-07-14 15:28:08 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/UploadResponse'
2020-07-13 08:01:07 +02:00
400:
description: "Invalid input"
2020-07-14 15:28:08 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
2020-07-13 08:01:07 +02:00
415:
description: "Unsupported file type"
2020-07-14 15:28:08 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
2020-07-13 08:01:07 +02:00
500:
description: "Unable to clean the file"
2020-07-14 15:28:08 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'