add api specification
This commit is contained in:
parent
70579365c1
commit
101473dccc
48
api.md
Normal file
48
api.md
Normal file
@ -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"
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue
Block a user