openapi: 3.0.0 info: title: Hausverwaltung version: "0.1" security: - jwt: [] paths: /hv/objekte: get: tags: [ "Objekte" ] operationId: Objekte.get_objekte summary: Returns all Objekte responses: 200: description: Successful response. content: 'application/json': schema: type: array items: $ref: '#/components/schemas/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 required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: $ref: '#/components/schemas/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. content: 'application/json': schema: type: array items: $ref: '#/components/schemas/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 required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: type: array items: $ref: '#/components/schemas/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 required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: $ref: '#/components/schemas/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. content: 'application/json': schema: type: array items: $ref: '#/components/schemas/Mieter' 404: description: No Mieter available 500: description: Some server error security: - jwt: ['secret'] /hv/mieter/{id}: get: tags: [ "Mieter" ] operationId: Mieter.get_mieter summary: Returns Mieter by id parameters: - name: id in: path required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: $ref: '#/components/schemas/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 required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: $ref: '#/components/schemas/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 required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: type: array items: $ref: '#/components/schemas/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 required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: $ref: '#/components/schemas/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 required: true schema: type: integer responses: 200: description: Successful response. content: 'application/json': schema: type: array items: $ref: '#/components/schemas/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 required: true schema: type: integer - name: year in: path required: true schema: type: integer responses: 200: description: Successful response content: 'application/json': schema: type: array items: $ref: '#/components/schemas/ZahlungForderung' 404: description: No ZahlungForderung available 500: description: Some server error /hv/mieter/{mieter_id}/saldo/{year}: get: tags: [ "Mieter", "Zahlung" ] operationId: ZahlungenForderungen.get_saldo_by_mieter_and_year summary: Returns sum of Zahlungen for a given Mieter and a given year parameters: - name: mieter_id in: path required: true schema: type: integer - name: year in: path required: true schema: type: integer responses: 200: description: Successful response content: 'application/json': schema: $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 requestBody: content: 'application/json': schema: $ref: '#/components/schemas/Zahlung' responses: 202: description: Zahlung successfully inserted 500: description: Some server or database error /secret: get: tags: [ "JWT" ] summary: Return secret string operationId: auth.get_secret responses: '200': description: secret response content: 'text/plain': schema: type: string components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT x-bearerInfoFunc: auth.decode_token schemas: 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 Saldo: description: Saldo type type: object properties: forderungen: type: number zahlungen: type: number saldo: type: number