Browse Source

Add endpoints to upload/download application/sepa for members

pull/4/head
Stefan Haun 2 years ago
parent
commit
6a53c6e670
  1. 79
      OAS3.yml

79
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

Loading…
Cancel
Save