From 51e4989174d23b83a95624faf6db04c8b19568a2 Mon Sep 17 00:00:00 2001 From: rui hildt Date: Sat, 8 Feb 2020 20:58:55 +0100 Subject: [PATCH] Correct documentation --- README.md | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index aa01398..4e281f4 100644 --- a/README.md +++ b/README.md @@ -15,24 +15,37 @@ ___ | name | string | | #### Get countries list -**`GET /api/countries`** +**`GET /api/countries/:country_id`** ##### Response -A json object with the `name` and `id`. +A json object with the `name` and `id` and `country_id`. ``` -{ - "id": 1, - "name": "Belgium" -} +[ + { + "id": 1, + "name": "bruges", + "country_id": 1 + }, + { + "id": 2, + "name": "antwerp", + "country_id": 1 + }, + { + "id": 3, + "name": "ghent", + "country_id": 1 + }, +] ``` ### CITIES | **`cities`** -| field | data type | metadata | -| :--------| :--------------------- | :-------------------------------------------------- | -| id | unsigned integer | primary key, auto-increments, generated by database | -| name | string | | -| integer | unsigned integer | foreign key referencing `countries.id` | +| field | data type | metadata | +| :----------| :--------------------- | :-------------------------------------------------- | +| id | unsigned integer | primary key, auto-increments, generated by database | +| name | string | | +| country_id | unsigned integer | foreign key referencing `countries.id` | #### Get cities list **`GET /api/cities`**