backend: allow to remove people from household, or move to a new household

This commit is contained in:
2021-06-10 13:01:42 +02:00
parent 6fed008ff2
commit 89734c680c
6 changed files with 261 additions and 18 deletions

View File

@@ -802,18 +802,61 @@ paths:
type: object
properties:
person:
$ref: '#/components/schemas/PersonById'
$ref: '#/components/schemas/PersonById'
start_date:
$ref: '#/components/schemas/Date'
$ref: '#/components/schemas/Date'
position:
$ref: '#/components/schemas/HouseholdPosition'
$ref: '#/components/schemas/HouseholdPosition'
holder:
type: boolean
comment:
type: string
destination:
oneOf:
- $ref: '#/components/schemas/Household'
$ref: '#/components/schemas/Household'
examples:
Moving person to a new household:
value:
concerned:
-
person:
id: 0
type: person
position:
type: position
id: 1
start_date:
datetime: 2021-06-01T00:00:00+02:00
comment: "This is my comment for moving"
holder: false
destination:
type: household
Moving person to an existing household:
value:
concerned:
-
person:
id: 0
type: person
position:
type: position
id: 1
start_date:
datetime: 2021-06-01T00:00:00+02:00
comment: "This is my comment for moving"
holder: false
destination:
type: household
id: 54
Removing a person from any household:
value:
concerned:
-
person:
id: 0
type: person
start_date:
datetime: 2021-06-01T00:00:00+02:00
destination: null
responses:
401:
description: "Unauthorized"