From 5d1e6b3235f9cddf66611e7cf4f4d0b41ffd7368 Mon Sep 17 00:00:00 2001 From: Jan Friedli Date: Tue, 14 Jul 2020 15:28:08 +0200 Subject: upgrade to oas 3 --- matweb/oas/upload.yml | 92 ++++++++++++++++----------------------------------- 1 file changed, 28 insertions(+), 64 deletions(-) (limited to 'matweb/oas/upload.yml') 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 @@ tags: - "File Upload (Metadata removal)" summary: 'Upload a single file which will be cleaned from metadata' -consumes: - - "application/json" -produces: - - "application/json" -parameters: -- in: "body" - name: "body" +requestBody: description: "The file that will be cleaned from metadata. Note that the file must be base64 encoded" required: true - schema: - type: "object" - properties: - file_name: - type: "string" - example: 'my_example.jpg' - file: - type: "string" - example: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==' + content: + application/json: + schema: + type: "object" + properties: + file_name: + type: "string" + example: 'my_example.jpg' + file: + type: "string" + example: 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==' responses: 201: description: "An object containing all info about the cleaned file" - schema: - $ref: '#/definitions/UploadResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/UploadResponse' 400: description: "Invalid input" - schema: - $ref: '#/definitions/ErrorResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' 415: description: "Unsupported file type" - schema: - $ref: '#/definitions/ErrorResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' 500: description: "Unable to clean the file" - schema: - $ref: '#/definitions/ErrorResponse' - -definitions: - UploadResponse: - type: "object" - properties: - inactive_after_sec: - type: "integer" - format: "int64" - description: "Defines after how many seconds the download wont be available" - output_filename: - type: "string" - description: "The resulting filename after metadata removal" - mime: - type: "string" - description: "The mime type of the cleaned file" - key: - type: "string" - description: "A key used to guarantee file integrity" - secret: - type: "string" - description: "A secret used to guarantee file integrity" - meta: - type: "object" - description: "An object of the removed metadata where key indicates the metadata type" - items: - type: "string" - meta_after: - type: "object" - description: "An object of the remaining metadata where key indicates the metadata type" - items: - type: "string" - download_link: - type: "string" - description: "The link to download the cleaned file" - ErrorResponse: - type: "object" - properties: - message: - type: "string" - description: "A description of the error" \ No newline at end of file + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' \ No newline at end of file -- cgit v1.3