160 lines
3.8 KiB
YAML
160 lines
3.8 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
title: hv2-api
|
|
version: "1"
|
|
description: "REST-API for the Nober Grundbesitz GbR Hausverwaltungs-Software"
|
|
termsOfService: "https://home.hottis.de/dokuwiki/doku.php?id=hv2pub:termsofuse"
|
|
contact:
|
|
name: "Wolfgang Hottgenroth"
|
|
email: "wolfgang.hottgenroth@icloud.com"
|
|
externalDocs:
|
|
description: "Find more details here"
|
|
url: "https://home.hottis.de/dokuwiki/doku.php?id=hv2pub:externaldocs"
|
|
|
|
paths:
|
|
/v1/test:
|
|
get:
|
|
tags: [ "Test" ]
|
|
summary: Return secret string
|
|
operationId: auth.testToken
|
|
responses:
|
|
'200':
|
|
description: secret response
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
$ref: '#/components/schemas/TestOutput'
|
|
security:
|
|
- jwt: ['secret']
|
|
/v1/accounts:
|
|
get:
|
|
tags: [ "Account" ]
|
|
summary: Return all normalized accounts
|
|
operationId: account.getAccounts
|
|
responses:
|
|
'200':
|
|
description: accounts response
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Account'
|
|
security:
|
|
- jwt: ['secret']
|
|
/v1/accounts/{accountId}:
|
|
get:
|
|
tags: [ "Account" ]
|
|
summary: Return the normalized account with given id
|
|
operationId: account.getAccount
|
|
parameters:
|
|
- name: accountId
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: accounts response
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Account'
|
|
security:
|
|
- jwt: ['secret']
|
|
/v1/tenants:
|
|
get:
|
|
tags: [ "Tenant" ]
|
|
summary: Return all normalized tenants
|
|
operationId: account.getTenants
|
|
responses:
|
|
'200':
|
|
description: tenant response
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Tenant'
|
|
security:
|
|
- jwt: ['secret']
|
|
/v1/tenants/{tenantId}:
|
|
get:
|
|
tags: [ "Tenant" ]
|
|
summary: Return the normalized tenant with given id
|
|
operationId: account.getTenant
|
|
parameters:
|
|
- name: tenantId
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: tenants response
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Tenant'
|
|
security:
|
|
- jwt: ['secret']
|
|
|
|
components:
|
|
securitySchemes:
|
|
jwt:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
x-bearerInfoFunc: auth.decodeToken
|
|
schemas:
|
|
TestOutput:
|
|
description: Test Output
|
|
type: object
|
|
properties:
|
|
message:
|
|
type: string
|
|
details:
|
|
type: string
|
|
Account:
|
|
description: Account
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
description:
|
|
type: string
|
|
Tenant:
|
|
description: Tenant
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
salutation:
|
|
type: string
|
|
firstname:
|
|
type: string
|
|
lastname:
|
|
type: string
|
|
address1:
|
|
type: string
|
|
address2:
|
|
type: string
|
|
address3:
|
|
type: string
|
|
zip:
|
|
type: string
|
|
city:
|
|
type: string
|
|
phone1:
|
|
type: string
|
|
phone2:
|
|
type: string
|
|
iban:
|
|
type: string
|
|
account:
|
|
type: integer
|