household address: add swagger documentation

This commit is contained in:
nobohan 2021-06-08 08:55:41 +02:00
parent 9d32ccbcad
commit 66b54bad31

View File

@ -784,6 +784,41 @@ paths:
400:
description: "transition cannot be applyed"
/1.0/person/household.json:
get:
tags:
- household
summary: Return a list of all household
responses:
200:
description: "ok"
/1.0/person/household/{id}.json:
get:
tags:
- household
summary: Return a household by id
parameters:
- name: id
in: path
required: true
description: The household id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "ok"
content:
application/json:
schema:
$ref: '#/components/schemas/Household'
404:
description: "not found"
401:
description: "Unauthorized"
/1.0/person/household/members/move.json:
post:
tags:
@ -826,3 +861,38 @@ paths:
400:
description: "transition cannot be applyed"
/1.0/person/household/{id}/address.json:
post:
tags:
- household
summary: post an address to a household
parameters:
- name: id
in: path
required: true
description: The household id
schema:
type: integer
format: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: integer
description: The address id to attach to the household
responses:
401:
description: "Unauthorized"
404:
description: "Not found"
200:
description: "OK"
422:
description: "Unprocessable entity (validation errors)"
400:
description: "transition cannot be applyed"