Correct documentation

This commit is contained in:
rui hildt 2020-02-08 20:58:55 +01:00
parent 35e2dcb8da
commit 51e4989174

View File

@ -15,24 +15,37 @@ ___
| name | string | | | name | string | |
#### Get countries list #### Get countries list
**`GET /api/countries`** **`GET /api/countries/:country_id`**
##### Response ##### Response
A json object with the `name` and `id`. A json object with the `name` and `id` and `country_id`.
``` ```
{ [
{
"id": 1, "id": 1,
"name": "Belgium" "name": "bruges",
} "country_id": 1
},
{
"id": 2,
"name": "antwerp",
"country_id": 1
},
{
"id": 3,
"name": "ghent",
"country_id": 1
},
]
``` ```
### CITIES | **`cities`** ### CITIES | **`cities`**
| field | data type | metadata | | field | data type | metadata |
| :--------| :--------------------- | :-------------------------------------------------- | | :----------| :--------------------- | :-------------------------------------------------- |
| id | unsigned integer | primary key, auto-increments, generated by database | | id | unsigned integer | primary key, auto-increments, generated by database |
| name | string | | | name | string | |
| integer | unsigned integer | foreign key referencing `countries.id` | | country_id | unsigned integer | foreign key referencing `countries.id` |
#### Get cities list #### Get cities list
**`GET /api/cities`** **`GET /api/cities`**