address: add swagger documentation

This commit is contained in:
nobohan 2021-06-08 20:36:20 +02:00
parent 6a42edd460
commit db77224b9f

View File

@ -142,7 +142,6 @@ paths:
responses:
200:
description: "OK"
/1.0/main/address.json:
get:
tags:
@ -151,6 +150,57 @@ paths:
responses:
200:
description: "ok"
post:
tags:
- address
summary: create a new address
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
buildingName:
type: string
corridor:
type: string
distribution:
type: string
extra:
type: string
flat:
type: string
floor:
type: string
isNoAddress:
type: boolean
point:
type: array
items:
type: number
minItems: 2
maxItems: 2
postcode:
$ref: '#/components/schemas/PostalCode'
steps:
type: string
street:
type: string
streetNumber:
type: string
responses:
401:
description: "Unauthorized"
404:
description: "Not found"
200:
description: "OK"
422:
description: "Unprocessable entity (validation errors)"
400:
description: "transition cannot be applyed"
/1.0/main/address/{id}.json:
get:
tags: