hv-service/swagger.yaml
2021-01-19 11:34:03 +01:00

349 lines
8.1 KiB
YAML

swagger: '2.0'
info:
title: Hausverwaltung
version: "0.1"
paths:
/hv/objekte:
get:
tags: [ "Objekte" ]
operationId: Objekte.get_objekte
summary: Returns all Objekte
responses:
200:
description: Successful response.
schema:
type: array
items:
$ref: '#/definitions/Objekt'
404:
description: No Objekte available
500:
description: Some server error
/hv/objekt/{id}:
get:
tags: [ "Objekte" ]
operationId: Objekte.get_objekt
summary: Returns Objekt by id
parameters:
- name: id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
$ref: '#/definitions/Objekt'
404:
description: Objekt not found
500:
description: Some server error
/hv/wohnungen:
get:
tags: [ "Wohnungen" ]
operationId: Wohnungen.get_wohnungen
summary: Returns all Wohnungen
responses:
200:
description: Successful response.
schema:
type: array
items:
$ref: '#/definitions/Wohnung'
404:
description: No Wohnung available
500:
description: Some server error
/hv/objekt/{id}/wohnungen:
get:
tags: [ "Wohnungen", "Objekte" ]
operationId: Wohnungen.get_wohnungen_by_objekt
summary: Returns all Wohnungen for one Objekt
parameters:
- name: id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
type: array
items:
$ref: '#/definitions/Wohnung'
404:
description: No Wohnung available
500:
description: Some server error
/hv/wohnung/{id}:
get:
tags: [ "Wohnungen" ]
operationId: Wohnungen.get_wohnung
summary: Returns Wohnung by id
parameters:
- name: id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
$ref: '#/definitions/Wohnung'
404:
description: Wohnung not found
500:
description: Some server error
/hv/mieters:
get:
tags: [ "Mieter" ]
operationId: Mieter.get_mieters
summary: Returns all Mieter
responses:
200:
description: Successful response.
schema:
type: array
items:
$ref: '#/definitions/Mieter'
404:
description: No Mieter available
500:
description: Some server error
/hv/mieter/{id}:
get:
tags: [ "Mieter" ]
operationId: Mieter.get_mieter
summary: Returns Mieter by id
parameters:
- name: id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
$ref: '#/definitions/Mieter'
404:
description: Mieter not found
500:
description: Some server error
/hv/forderung/{id}:
get:
tags: [ "Forderung" ]
operationId: ZahlungenForderungen.get_forderung
summary: Returns Forderung by id
parameters:
- name: id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
$ref: '#/definitions/Forderung'
404:
description: Forderung not found
500:
description: Some server error
/hv/mieter/{mieter_id}/forderungen:
get:
tags: [ "Mieter", "Forderung" ]
operationId: ZahlungenForderungen.get_forderungen_by_mieter
summary: Returns all Forderungen for a given Mieter
parameters:
- name: mieter_id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
type: array
items:
$ref: '#/definitions/Forderung'
404:
description: No Forderung available
500:
description: Some server error
/hv/zahlung/{id}:
get:
tags: [ "Zahlung" ]
operationId: ZahlungenForderungen.get_zahlung
summary: Returns Zahlung by id
parameters:
- name: id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
$ref: '#/definitions/Zahlung'
404:
description: Zahlung not found
500:
description: Some server error
/hv/mieter/{mieter_id}/zahlungen:
get:
tags: [ "Mieter", "Zahlung" ]
operationId: ZahlungenForderungen.get_zahlungen_by_mieter
summary: Returns all Zahlungen for a given Mieter
parameters:
- name: mieter_id
in: path
type: integer
required: true
responses:
200:
description: Successful response.
schema:
type: array
items:
$ref: '#/definitions/Zahlung'
404:
description: No Zahlung available
500:
description: Some server error
/hv/mieter/{mieter_id}/zahlungforderung/{year}:
get:
tags: [ "Mieter", "Zahlung", "Forderung" ]
operationId: ZahlungenForderungen.get_zahlungforderung_by_mieter_and_year
summary: Returns all Zahlungen and Forderungen for a given Mieter and a given year
parameters:
- name: mieter_id
in: path
type: integer
required: true
- name: year
in: path
type: integer
required: true
responses:
200:
description: Successful response
schema:
type: array
items:
$ref: '#/definitions/ZahlungForderung'
404:
description: No ZahlungForderung available
500:
description: Some server error
definitions:
Objekt:
description: Objekt type
type: object
properties:
id:
type: integer
shortname:
type: string
flaeche:
type: number
Wohnung:
description: Wohnung type
type: object
properties:
id:
type: integer
objekt:
type: integer
shortname:
type: string
flaeche:
type: number
objekt_shortname:
type: string
Mieter:
description: Mieter type
type: object
properties:
id:
type: integer
objekt:
type: integer
wohnung:
type: integer
wohnung_shortname:
type: string
objekt_shortname:
type: string
anrede:
type: string
vorname:
type: string
nachname:
type: string
strasse:
type: string
plz:
type: string
ort:
type: string
telefon:
type: string
einzug:
type: string
auszug:
type: string
Forderung:
description: Forderung type
type: object
properties:
id:
type: integer
mieter:
type: integer
datum:
type: string
betrag:
type: number
kommentar:
type: string
ref_wohnung:
type: number
Zahlung:
description: Zahlung type
type: object
properties:
id:
type: integer
mieter:
type: integer
datum_ist:
type: string
datum_soll:
type: string
betrag:
type: number
kommentar:
type: string
ZahlungForderung:
description: ZahlungForderung type
type: object
properties:
zf_type:
type: string
id:
type: integer
datum_soll:
type: string
datum_ist:
type: string
betrag_zahlung:
type: number
betrag_forderung:
type: number
kommentar:
type: string
mieter:
type: number