Controller action to move members of an household

This commit is contained in:
2021-05-31 20:42:07 +02:00
parent ace3b1969e
commit 041b1dfc51
12 changed files with 356 additions and 48 deletions

View File

@@ -192,6 +192,25 @@ components:
text:
type: string
readOnly: true
Household:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- 'household'
HouseholdPosition:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- 'household_position'
paths:
/1.0/person/person/{id}.json:
@@ -764,3 +783,46 @@ paths:
description: "OK"
400:
description: "transition cannot be applyed"
/1.0/person/household/members/move.json:
post:
tags:
- household
summary: move one or multiple person from a household to another
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
concerned:
type: array
items:
type: object
properties:
person:
$ref: '#/components/schemas/PersonById'
start_date:
$ref: '#/components/schemas/Date'
position:
$ref: '#/components/schemas/HouseholdPosition'
holder:
type: boolean
comment:
type: string
destination:
oneOf:
- $ref: '#/components/schemas/Household'
responses:
401:
description: "Unauthorized"
404:
description: "Not found"
200:
description: "OK"
422:
description: "Unprocessable entity (validation errors)"
400:
description: "transition cannot be applyed"