diff options
Diffstat (limited to 'matweb/oas/upload.yml')
| -rw-r--r-- | matweb/oas/upload.yml | 92 |
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 @@ | |||
| 2 | tags: | 2 | tags: |
| 3 | - "File Upload (Metadata removal)" | 3 | - "File Upload (Metadata removal)" |
| 4 | summary: 'Upload a single file which will be cleaned from metadata' | 4 | summary: 'Upload a single file which will be cleaned from metadata' |
| 5 | consumes: | 5 | requestBody: |
| 6 | - "application/json" | ||
| 7 | produces: | ||
| 8 | - "application/json" | ||
| 9 | parameters: | ||
| 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 | ||
| 24 | responses: | 20 | responses: |
| 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: | |
| 42 | definitions: | 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 | ||
