address: add swagger doc on API point for address

This commit is contained in:
nobohan 2021-06-07 17:24:31 +02:00
parent 03a7ec389b
commit 63c3b5a970

View File

@ -17,6 +17,19 @@ components:
type: integer
name:
type: string
Address:
type: object
properties:
address_id:
type: integer
text:
type: string
postcode:
type: object
properties:
name:
type: string
paths:
/1.0/search.json:
@ -29,7 +42,7 @@ paths:
description: >
**Warning**: This is currently a stub (not really implemented
The search is performed across multiple entities. The entities must be listed into
The search is performed across multiple entities. The entities must be listed into
`type` parameters.
The results are ordered by relevance, from the most to the lowest relevant.
@ -56,3 +69,36 @@ paths:
200:
description: "OK"
/1.0/main/address.json:
get:
tags:
- address
summary: Return a list of all Chill addresses
responses:
200:
description: "ok"
/1.0/main/address/{id}.json:
get:
tags:
- address
summary: Return an address by id
parameters:
- name: id
in: path
required: true
description: The address id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "ok"
content:
application/json:
schema:
$ref: '#/components/schemas/Address'
404:
description: "not found"
401:
description: "Unauthorized"