Further modifications towards a full API specification
This commit is contained in:
parent
6eee6a4fe6
commit
3c7354b8a6
461
api/openapi.yaml
461
api/openapi.yaml
@ -145,7 +145,9 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
user:
|
||||
$ref: "#/components/schemas/User"
|
||||
type: integer
|
||||
example: 13
|
||||
description: Die `id` des Nutzers
|
||||
admin:
|
||||
type: boolean
|
||||
description: Der Nutzer hat Admin-Rechte in dem Verein
|
||||
@ -249,10 +251,9 @@ components:
|
||||
description: Die BIC Nummer des Vereins
|
||||
example: ABDECDEEH
|
||||
president:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/User"
|
||||
title: User
|
||||
description: Der Vorstandsvorsitzende des Vereins
|
||||
type: string
|
||||
description: Der Alias des Vorstandsvorsitzendes des Vereins
|
||||
example: dduck
|
||||
required:
|
||||
- name
|
||||
- address
|
||||
@ -260,6 +261,38 @@ components:
|
||||
- homepage
|
||||
- mail
|
||||
- president
|
||||
|
||||
ConfirmationOfCharitability:
|
||||
description: Bescheinigung der Gemeinnützigkeit
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 44
|
||||
description: id der Bescheinigung
|
||||
startingDay:
|
||||
type: integer
|
||||
example: 12
|
||||
description: Tag der Ausstellung des Bescheids
|
||||
startingMonth:
|
||||
type: integer
|
||||
example: 3
|
||||
description: Monat der Ausstellung des Bescheids
|
||||
startingYear:
|
||||
type: integer
|
||||
example: 2019
|
||||
description: Jahr der Ausstellung des Bescheids
|
||||
user:
|
||||
type: string
|
||||
example: mmuster
|
||||
description: Der Alias des Nutzers
|
||||
required:
|
||||
- id
|
||||
- startingDay
|
||||
- startingMonth
|
||||
- startingYear
|
||||
- user
|
||||
|
||||
|
||||
tags:
|
||||
- name: Benutzer
|
||||
@ -271,7 +304,11 @@ tags:
|
||||
- name: Vorstand
|
||||
description: Aktuell vergebene Vostandsposten
|
||||
- name: Trainingsangebote
|
||||
description: Tanz- und Trainingsangebote eines Vereins
|
||||
- name: Trainingsräume
|
||||
description: Vorhandene Räume in denen Training abgehalten werden kann
|
||||
- name: Gemeinnützigkeit
|
||||
description: Bescheinigungen zur Gemeinnützigkeit einreichen
|
||||
- name: Sonstiges
|
||||
description: Zugriff auf statische Konfigurationen
|
||||
|
||||
@ -774,7 +811,421 @@ paths:
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/club/{clubid}/charity:
|
||||
parameters:
|
||||
- name: clubid
|
||||
required: true
|
||||
in: path
|
||||
schema:
|
||||
type: integer
|
||||
|
||||
get:
|
||||
summary: Den aktuellen Bescheid der Gemeinnützigkeit abfragen
|
||||
tags: [Gemeinnützigkeit]
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConfirmationOfCharitability"
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
404:
|
||||
description: Verein wurde nicht gefunden
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/club/{clubid}/charities:
|
||||
parameters:
|
||||
- name: clubid
|
||||
required: true
|
||||
in: path
|
||||
schema:
|
||||
type: integer
|
||||
|
||||
get:
|
||||
summary: Den hochgeladenen Bescheide abfragen
|
||||
tags: [Gemeinnützigkeit]
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
entry:
|
||||
$ref: "#/components/schemas/ConfirmationOfCharitability"
|
||||
state:
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- renewed
|
||||
- rejected
|
||||
- pending
|
||||
required:
|
||||
- entry
|
||||
- state
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
404:
|
||||
description: Verein wurde nicht gefunden
|
||||
403:
|
||||
$ref: "#/components/responses/notAllowed"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
post:
|
||||
summary: Einen neuen Bescheid hochladen
|
||||
tags: [Gemeinnützigkeit]
|
||||
requestBody:
|
||||
description: Die relevanten Daten
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
config:
|
||||
type: object
|
||||
description: Meta-Daten der übermittelten Datei
|
||||
properties:
|
||||
startingDay:
|
||||
type: integer
|
||||
example: 22
|
||||
description: Tag der Ausstellung des Bescheids
|
||||
startingMonth:
|
||||
type: integer
|
||||
example: 11
|
||||
description: Monat der Ausstellung des Bescheids
|
||||
startingYear:
|
||||
type: integer
|
||||
example: 2020
|
||||
description: Jahr der Ausstellung des Bescheids
|
||||
required:
|
||||
- startingDay
|
||||
- startingMonth
|
||||
- startingYear
|
||||
file:
|
||||
type: string
|
||||
description: Die Datei (PDF/PNG/JPG) des gescannten Bescheids
|
||||
format: binary
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 45
|
||||
description: Die `id` des neu eingetragenen Bescheids
|
||||
required:
|
||||
- id
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
403:
|
||||
$ref: "#/components/responses/notAllowed"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/club/{clubid}/charity/{charityid}:
|
||||
parameters:
|
||||
- name: clubid
|
||||
required: true
|
||||
in: path
|
||||
schema:
|
||||
type: integer
|
||||
- name: charityid
|
||||
required: true
|
||||
in: path
|
||||
schema:
|
||||
type: integer
|
||||
|
||||
get:
|
||||
summary: Einen bestimmten Bescheid der Gemeinnützigkeit abfragen
|
||||
tags: [Gemeinnützigkeit]
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConfirmationOfCharitability"
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
put:
|
||||
summary: Den Status eines Bescheids aktualisieren
|
||||
tags: [Gemeinnützigkeit]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
startingDay:
|
||||
type: integer
|
||||
example: 11
|
||||
description: Der Ausstellungstag des Bescheids
|
||||
startingMonth:
|
||||
type: integer
|
||||
example: 5
|
||||
description: Der Ausstellungsmonat des Bescheids
|
||||
startingYear:
|
||||
type: integer
|
||||
example: 2019
|
||||
description: Das Ausstellungsjahr des Bescheids
|
||||
state:
|
||||
type: string
|
||||
description: Der (neue) Zustand des Bescheids
|
||||
enum:
|
||||
- active
|
||||
- rejected
|
||||
- pending
|
||||
responses:
|
||||
200:
|
||||
$ref: "#/components/responses/ok"
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
403:
|
||||
$ref: "#/components/responses/notAllowed"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
delete:
|
||||
summary: Einen abgelehnten oder zu prüfenden Bescheid löschen
|
||||
tags: [Gemeinnützigkeit]
|
||||
responses:
|
||||
200:
|
||||
$ref: "#/components/responses/ok"
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
403:
|
||||
$ref: "#/components/responses/notAllowed"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/club/{clubid}/charity/{charityid}/pdf:
|
||||
parameters:
|
||||
- name: clubid
|
||||
required: true
|
||||
in: path
|
||||
schema:
|
||||
type: integer
|
||||
- name: charityid
|
||||
required: true
|
||||
in: path
|
||||
schema:
|
||||
type: integer
|
||||
|
||||
get:
|
||||
summary: Den Scan eines Bescheids abfragen
|
||||
tags: [Gemeinnützigkeit]
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
content:
|
||||
application/pdf:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/me/mails:
|
||||
get:
|
||||
tags: [Benutzer]
|
||||
summary: Die Mails des Nutzers abfragen
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
mail:
|
||||
type: string
|
||||
example: d.duck@entenhausen.de
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
|
||||
/me/mail:
|
||||
post:
|
||||
tags: [Benutzer]
|
||||
summary: Eine neue Mail-Adresse des Nutzers registrieren
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
mail:
|
||||
type: string
|
||||
example: dagobert@tsc-entenhausen.de
|
||||
description: Die neu hinzuzufügende Mail-Adresse
|
||||
required: [mail]
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
delete:
|
||||
tags: [Benutzer]
|
||||
summary: Eine neue Mail-Adresse des Nutzers registrieren
|
||||
parameters:
|
||||
- name: mail
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: dagobert@tsc-entenhausen.de
|
||||
description: Die neu hinzuzufügende Mail-Adresse
|
||||
responses:
|
||||
200:
|
||||
$ref: "#/components/responses/ok"
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/change_password:
|
||||
post:
|
||||
tags: [Benutzer]
|
||||
summary: Das Passwort eines Nutzers anpassen
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
user:
|
||||
type: integer
|
||||
example: 12
|
||||
description: Die `id` des Nutzers, dessen Passwort angepasst werden soll. Wenn nicht gegeben wird das Passwort des eingeloggten Nutzers geändert
|
||||
new_pasword:
|
||||
type: string
|
||||
example: very_save_password
|
||||
description: Das neue Passwort des Nutzers
|
||||
responses:
|
||||
200:
|
||||
$ref: "#/components/responses/ok"
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/users/search:
|
||||
get:
|
||||
tags: [Benutzer]
|
||||
summary: Nach einem Nutzer suchen
|
||||
parameters:
|
||||
- name: name
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
- name: city
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
- name: mail
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
- name: phone
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
example: 23
|
||||
description: Die `id` des Nutzers
|
||||
name:
|
||||
type: string
|
||||
example: Dagobert Duck
|
||||
description: Der Name des Nutzers
|
||||
city:
|
||||
type: string
|
||||
example: Entenhausen
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- city
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/user:
|
||||
post:
|
||||
tags: [Benutzer]
|
||||
summary: Einen neuen Benutzer anlegen
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: Daisy Duck
|
||||
mail:
|
||||
type: string
|
||||
example: daisy@ducks.org
|
||||
required: [name, mail]
|
||||
responses:
|
||||
200:
|
||||
$ref: "#/components/responses/ok"
|
||||
401:
|
||||
$ref: "#/components/responses/notAuth"
|
||||
400:
|
||||
$ref: "#/components/responses/error"
|
||||
|
||||
/user/{useralias}:
|
||||
parameters:
|
||||
- name: useralias
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: dduck
|
||||
|
||||
get:
|
||||
tags: [Benutzer]
|
||||
summary: Die Eigenschaften eines Nutzers erfragen
|
||||
security: []
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/User"
|
||||
|
||||
security:
|
||||
- jwt: []
|
||||
|
Loading…
Reference in New Issue
Block a user