From 101473dccc16f506eda7f87575a8413126ae2110 Mon Sep 17 00:00:00 2001 From: Mikkel Date: Fri, 10 Feb 2023 08:45:40 +0100 Subject: [PATCH] add api specification --- api.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 api.md diff --git a/api.md b/api.md new file mode 100644 index 0000000..07e4c47 --- /dev/null +++ b/api.md @@ -0,0 +1,48 @@ +# Api specification + + + +## Review + +### Review model + +```ts +{ + id: number, + location: string, + title: string, + content: string, + stars: number +} +``` + +### GET reviews + +#### Response + +```ts +{ + Review[] +} +``` + +### Post createReview + +#### Request + +```ts +{ + location: string, + title: string, + content: string, + stars: number +} +``` + +#### Response + +```ts +{ + message: "Ok" | "Invalid request" +} +``` \ No newline at end of file