summaryrefslogtreecommitdiff
path: root/matweb/oas/upload.yml
diff options
context:
space:
mode:
authorJan Friedli2020-07-14 15:28:08 +0200
committerJan Friedli2020-07-14 15:28:08 +0200
commit5d1e6b3235f9cddf66611e7cf4f4d0b41ffd7368 (patch)
treedc95468b0d3ae3783560dfe3916b5dba2bf775ea /matweb/oas/upload.yml
parent42f9ede4bf9ee5cf0e7fda74fcd37bea5540c302 (diff)
upgrade to oas 3
Diffstat (limited to '')
-rw-r--r--matweb/oas/upload.yml92
1 files changed, 28 insertions, 64 deletions
diff --git a/matweb/oas/upload.yml b/matweb/oas/upload.yml
index 71cb87b..4133d08 100644
--- a/matweb/oas/upload.yml
+++ b/matweb/oas/upload.yml
@@ -2,79 +2,43 @@
2tags: 2tags:
3 - "File Upload (Metadata removal)" 3 - "File Upload (Metadata removal)"
4summary: 'Upload a single file which will be cleaned from metadata' 4summary: 'Upload a single file which will be cleaned from metadata'
5consumes: 5requestBody:
6 - "application/json"
7produces:
8 - "application/json"
9parameters:
10- in: "body"
11 name: "body"
12 description: "The file that will be cleaned from metadata. Note that the file must be base64 encoded" 6 description: "The file that will be cleaned from metadata. Note that the file must be base64 encoded"
13 required: true 7 required: true
14 schema: 8 content:
15 type: "object" 9 application/json:
16 properties: 10 schema:
17 file_name: 11 type: "object"
18 type: "string" 12 properties:
19 example: 'my_example.jpg' 13 file_name:
20 file: 14 type: "string"
21 type: "string" 15 example: 'my_example.jpg'
22 example: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==' 16 file:
17 type: "string"
18 example: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='
23 19
24responses: 20responses:
25 201: 21 201:
26 description: "An object containing all info about the cleaned file" 22 description: "An object containing all info about the cleaned file"
27 schema: 23 content:
28 $ref: '#/definitions/UploadResponse' 24 application/json:
25 schema:
26 $ref: '#/components/schemas/UploadResponse'
29 400: 27 400:
30 description: "Invalid input" 28 description: "Invalid input"
31 schema: 29 content:
32 $ref: '#/definitions/ErrorResponse' 30 application/json:
31 schema:
32 $ref: '#/components/schemas/ErrorResponse'
33 415: 33 415:
34 description: "Unsupported file type" 34 description: "Unsupported file type"
35 schema: 35 content:
36 $ref: '#/definitions/ErrorResponse' 36 application/json:
37 schema:
38 $ref: '#/components/schemas/ErrorResponse'
37 500: 39 500:
38 description: "Unable to clean the file" 40 description: "Unable to clean the file"
39 schema: 41 content:
40 $ref: '#/definitions/ErrorResponse' 42 application/json:
41 43 schema:
42definitions: 44 $ref: '#/components/schemas/ErrorResponse' \ No newline at end of file
43 UploadResponse:
44 type: "object"
45 properties:
46 inactive_after_sec:
47 type: "integer"
48 format: "int64"
49 description: "Defines after how many seconds the download wont be available"
50 output_filename:
51 type: "string"
52 description: "The resulting filename after metadata removal"
53 mime:
54 type: "string"
55 description: "The mime type of the cleaned file"
56 key:
57 type: "string"
58 description: "A key used to guarantee file integrity"
59 secret:
60 type: "string"
61 description: "A secret used to guarantee file integrity"
62 meta:
63 type: "object"
64 description: "An object of the removed metadata where key indicates the metadata type"
65 items:
66 type: "string"
67 meta_after:
68 type: "object"
69 description: "An object of the remaining metadata where key indicates the metadata type"
70 items:
71 type: "string"
72 download_link:
73 type: "string"
74 description: "The link to download the cleaned file"
75 ErrorResponse:
76 type: "object"
77 properties:
78 message:
79 type: "string"
80 description: "A description of the error" \ No newline at end of file