mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
address: swagger config for documenting API points
This commit is contained in:
parent
63c3b5a970
commit
9d32ccbcad
@ -30,6 +30,80 @@ components:
|
|||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
Country:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: object
|
||||||
|
countryCode:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
PostalCode:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
country:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: object
|
||||||
|
countryCode:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
AddressReference:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
refId:
|
||||||
|
type: string
|
||||||
|
street:
|
||||||
|
type: string
|
||||||
|
streetNumber:
|
||||||
|
type: string
|
||||||
|
postcode:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
country:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: object
|
||||||
|
countryCode:
|
||||||
|
type: string
|
||||||
|
municipalityCode:
|
||||||
|
type: string
|
||||||
|
source:
|
||||||
|
type: string
|
||||||
|
point:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
coordinates:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: number
|
||||||
|
minItems: 2
|
||||||
|
maxItems: 2
|
||||||
|
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
/1.0/search.json:
|
/1.0/search.json:
|
||||||
@ -102,3 +176,119 @@ paths:
|
|||||||
description: "not found"
|
description: "not found"
|
||||||
401:
|
401:
|
||||||
description: "Unauthorized"
|
description: "Unauthorized"
|
||||||
|
|
||||||
|
/1.0/main/address-reference.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- address
|
||||||
|
summary: Return a list of all reference addresses
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: postal_code
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The id of a postal code to filter the reference addresses
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "ok"
|
||||||
|
/1.0/main/address-reference/{id}.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- address
|
||||||
|
summary: Return a reference address by id
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The reference address id
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: integer
|
||||||
|
minimum: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "ok"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/AddressReference'
|
||||||
|
404:
|
||||||
|
description: "not found"
|
||||||
|
401:
|
||||||
|
description: "Unauthorized"
|
||||||
|
|
||||||
|
/1.0/main/postal-code.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- address
|
||||||
|
summary: Return a list of all postal-code
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: country
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
description: The id of a country to filter the postal code
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "ok"
|
||||||
|
/1.0/main/postal-code/{id}.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- address
|
||||||
|
summary: Return a postal code by id
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The postal code id
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: integer
|
||||||
|
minimum: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "ok"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PostalCode'
|
||||||
|
404:
|
||||||
|
description: "not found"
|
||||||
|
401:
|
||||||
|
description: "Unauthorized"
|
||||||
|
|
||||||
|
/1.0/main/country.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- address
|
||||||
|
summary: Return a list of all countries
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "ok"
|
||||||
|
/1.0/main/country/{id}.json:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- address
|
||||||
|
summary: Return a country by id
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The country id
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: integer
|
||||||
|
minimum: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "ok"
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Country'
|
||||||
|
404:
|
||||||
|
description: "not found"
|
||||||
|
401:
|
||||||
|
description: "Unauthorized"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user