57 lines
2.0 KiB
YAML
57 lines
2.0 KiB
YAML
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:
|
|
- $ref: './auth.yaml#/components/parameters/currentUser'
|
|
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
|
- 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:
|
|
$ref: './hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
|
|
"401":
|
|
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
|
"403":
|
|
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
|
|
|
post:
|
|
summary: Adds a new person.
|
|
tags:
|
|
- hs-office-persons
|
|
operationId: addPerson
|
|
parameters:
|
|
- $ref: './auth.yaml#/components/parameters/currentUser'
|
|
- $ref: './auth.yaml#/components/parameters/assumedRoles'
|
|
requestBody:
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
$ref: './hs-office-person-schemas.yaml#/components/schemas/HsOfficePersonInsert'
|
|
required: true
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
$ref: './hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
|
|
"401":
|
|
$ref: './error-responses.yaml#/components/responses/Unauthorized'
|
|
"403":
|
|
$ref: './error-responses.yaml#/components/responses/Forbidden'
|
|
"409":
|
|
$ref: './error-responses.yaml#/components/responses/Conflict'
|