From 6a53c6e6703ee25be5e3692849d05ec602c5341f Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Tue, 22 Dec 2020 14:37:45 +0100 Subject: [PATCH] Add endpoints to upload/download application/sepa for members --- OAS3.yml | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/OAS3.yml b/OAS3.yml index 16c65a6..501f221 100644 --- a/OAS3.yml +++ b/OAS3.yml @@ -200,6 +200,84 @@ paths: '404': $ref: '#/components/responses/NotFound' + /document/{id}/{type}: + parameters: + - in: path + name: id + required: true + schema: + type: string + description: Entity ID + - in: path + name: type + required: true + schema: + type: string + enum: [application, sepa] + description: Type of document to upload + - in: header + name: Authentication + schema: + type: string + description: Authentication token + post: + summary: Upload a PDF document for a member + description: Note that the entry must be updated with the URI obtained from this call + tags: + - document + requestBody: + description: The document + content: + 'application/pdf': + schema: + type: string + format: binary + responses: + '201': + description: File has been stored ("created") locally, returns the URI for downloading the file + content: + text/plain: + schema: + type: string + format: uri + '303': + description: The file is already in storage, returns the URI for downloading the file + content: + text/plain: + schema: + type: string + format: uri + '401': + $ref: '#/components/responses/AuthenticationRequired' + '403': + $ref: '#/components/responses/NotAllowed' + '405': + $ref: '#/components/responses/InvalidInput' + '500': + $ref: '#/components/responses/InternalError' + get: + summary: Get a PDF document for a member + tags: + - document + responses: + '200': + description: Returns PDF data + content: + 'application/pdf': + schema: + type: string + format: binary + '404': + $ref: '#/components/responses/NotFound' + '401': + $ref: '#/components/responses/AuthenticationRequired' + '403': + $ref: '#/components/responses/NotAllowed' + '405': + $ref: '#/components/responses/InvalidInput' + '500': + $ref: '#/components/responses/InternalError' + components: schemas: health: @@ -236,4 +314,3 @@ components: schema: type: string example: error message -