1 Commits

Author SHA1 Message Date
4f4b959e9e successfully moved to openapi 3.0.0 2021-01-24 23:24:20 +01:00

View File

@ -1,4 +1,4 @@
swagger: '2.0'
openapi: 3.0.0
info:
title: Hausverwaltung
version: "0.1"
@ -12,10 +12,12 @@ paths:
responses:
200:
description: Successful response.
content:
'application/json':
schema:
type: array
items:
$ref: '#/definitions/Objekt'
$ref: '#/components/schemas/Objekt'
404:
description: No Objekte available
500:
@ -28,13 +30,16 @@ paths:
parameters:
- name: id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
$ref: '#/definitions/Objekt'
$ref: '#/components/schemas/Objekt'
404:
description: Objekt not found
500:
@ -47,10 +52,12 @@ paths:
responses:
200:
description: Successful response.
content:
'application/json':
schema:
type: array
items:
$ref: '#/definitions/Wohnung'
$ref: '#/components/schemas/Wohnung'
404:
description: No Wohnung available
500:
@ -63,15 +70,18 @@ paths:
parameters:
- name: id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
type: array
items:
$ref: '#/definitions/Wohnung'
$ref: '#/components/schemas/Wohnung'
404:
description: No Wohnung available
500:
@ -84,13 +94,16 @@ paths:
parameters:
- name: id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
$ref: '#/definitions/Wohnung'
$ref: '#/components/schemas/Wohnung'
404:
description: Wohnung not found
500:
@ -103,10 +116,12 @@ paths:
responses:
200:
description: Successful response.
content:
'application/json':
schema:
type: array
items:
$ref: '#/definitions/Mieter'
$ref: '#/components/schemas/Mieter'
404:
description: No Mieter available
500:
@ -119,13 +134,16 @@ paths:
parameters:
- name: id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
$ref: '#/definitions/Mieter'
$ref: '#/components/schemas/Mieter'
404:
description: Mieter not found
500:
@ -138,13 +156,16 @@ paths:
parameters:
- name: id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
$ref: '#/definitions/Forderung'
$ref: '#/components/schemas/Forderung'
404:
description: Forderung not found
500:
@ -157,15 +178,18 @@ paths:
parameters:
- name: mieter_id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
type: array
items:
$ref: '#/definitions/Forderung'
$ref: '#/components/schemas/Forderung'
404:
description: No Forderung available
500:
@ -178,13 +202,16 @@ paths:
parameters:
- name: id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
$ref: '#/definitions/Zahlung'
$ref: '#/components/schemas/Zahlung'
404:
description: Zahlung not found
500:
@ -197,15 +224,18 @@ paths:
parameters:
- name: mieter_id
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response.
content:
'application/json':
schema:
type: array
items:
$ref: '#/definitions/Zahlung'
$ref: '#/components/schemas/Zahlung'
404:
description: No Zahlung available
500:
@ -218,19 +248,23 @@ paths:
parameters:
- name: mieter_id
in: path
type: integer
required: true
schema:
type: integer
- name: year
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response
content:
'application/json':
schema:
type: array
items:
$ref: '#/definitions/ZahlungForderung'
$ref: '#/components/schemas/ZahlungForderung'
404:
description: No ZahlungForderung available
500:
@ -243,39 +277,44 @@ paths:
parameters:
- name: mieter_id
in: path
type: integer
required: true
schema:
type: integer
- name: year
in: path
type: integer
required: true
schema:
type: integer
responses:
200:
description: Successful response
content:
'application/json':
schema:
$ref: '#/definitions/Saldo'
$ref: '#/components/schemas/Saldo'
404:
description: Neither Forderungen nor Zahlungen available
500:
description: Some server error
/hv/zahlung:
post:
tags: [ "Zahlung" ]
operationId: ZahlungenForderungen.put_zahlung
summary: Inserts a new Zahlung
parameters:
- name: zahlung
in: body
schema:
$ref: '#/definitions/Zahlung'
responses:
202:
description: Zahlung successfully inserted
500:
description: Some server or database error
# /hv/zahlung:
# post:
# tags: [ "Zahlung" ]
# operationId: ZahlungenForderungen.put_zahlung
# summary: Inserts a new Zahlung
# parameters:
# - name: zahlung
# in: body
# schema:
# $ref: '#/components/schemas/Zahlung'
# responses:
# 202:
# description: Zahlung successfully inserted
# 500:
# description: Some server or database error
definitions:
components:
schemas:
Objekt:
description: Objekt type
type: object