2022-09-21 09:44:09 +02:00
|
|
|
get:
|
|
|
|
summary: Returns a list of (optionally filtered) persons.
|
|
|
|
description: Returns the list of (optionally filtered) persons which are visible to the current user or any of it's assumed roles.
|
|
|
|
tags:
|
|
|
|
- hs-office-persons
|
|
|
|
operationId: listPersons
|
|
|
|
parameters:
|
2024-04-16 10:08:00 +02:00
|
|
|
- $ref: 'auth.yaml#/components/parameters/currentUser'
|
|
|
|
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
|
2022-09-21 09:44:09 +02:00
|
|
|
- name: name
|
|
|
|
in: query
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
description: Prefix of label to filter the results.
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
|
2022-09-21 09:44:09 +02:00
|
|
|
"401":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
|
2022-09-21 09:44:09 +02:00
|
|
|
"403":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Forbidden'
|
2022-09-21 09:44:09 +02:00
|
|
|
|
|
|
|
post:
|
|
|
|
summary: Adds a new person.
|
|
|
|
tags:
|
|
|
|
- hs-office-persons
|
|
|
|
operationId: addPerson
|
|
|
|
parameters:
|
2024-04-16 10:08:00 +02:00
|
|
|
- $ref: 'auth.yaml#/components/parameters/currentUser'
|
|
|
|
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
|
2022-09-21 09:44:09 +02:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'hs-office-person-schemas.yaml#/components/schemas/HsOfficePersonInsert'
|
2022-09-21 09:44:09 +02:00
|
|
|
required: true
|
|
|
|
responses:
|
|
|
|
"201":
|
|
|
|
description: Created
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
|
2022-09-21 09:44:09 +02:00
|
|
|
"401":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Unauthorized'
|
2022-09-21 09:44:09 +02:00
|
|
|
"403":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Forbidden'
|
2022-09-21 09:44:09 +02:00
|
|
|
"409":
|
2024-04-16 10:08:00 +02:00
|
|
|
$ref: 'error-responses.yaml#/components/responses/Conflict'
|