Fixed spelling and markdown notation
This commit is contained in:
parent
67be82915e
commit
890caf4724
30
README.md
30
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
## MODEL
|
||||
|
||||
###Product
|
||||
### Product
|
||||
```json5
|
||||
{
|
||||
"id": Int,
|
||||
@ -29,7 +29,7 @@ Any of these couldn't be ``null``
|
||||
|
||||
## API
|
||||
|
||||
###Edit quantity of the product.
|
||||
### Edit quantity of the product.
|
||||
|
||||
The service will handle `POST` requests for `/api/product/change-quantity`, by changing quantity of product in database.
|
||||
|
||||
@ -48,7 +48,7 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
Response `HttpStatus.OK` with ``JSON``:
|
||||
Response `200` with ``JSON``:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -64,7 +64,7 @@ Response `HttpStatus.OK` with ``JSON``:
|
||||
|
||||
* * *
|
||||
|
||||
###Retrieve a paginated list of products
|
||||
### Retrieve a paginated list of products
|
||||
|
||||
The service will handle `GET` requests for `/api/get-all`, by retreving a paginated list of products. Optionally with a `page`, `size` **or** `page`, `size` and`sort` parameters in the query string.
|
||||
Page start numbering on `page=0`. Default list is sorted by `id`.
|
||||
@ -74,7 +74,7 @@ Page start numbering on `page=0`. Default list is sorted by `id`.
|
||||
GET /api/get-all?page=0&size=1&sort=id
|
||||
Content-Type: application/json
|
||||
```
|
||||
Response with ``HttpStatus.OK`` with ``JSON`` :
|
||||
Response ``200`` with ``JSON`` :
|
||||
|
||||
```json
|
||||
{
|
||||
@ -120,14 +120,14 @@ Response with ``HttpStatus.OK`` with ``JSON`` :
|
||||
```
|
||||
|
||||
* * *
|
||||
###Get price of all products.
|
||||
### Get price of all products.
|
||||
The service will handle `GET` request on `/api/get-price-of-all` returing `Float` price of all products in the database.
|
||||
|
||||
```json
|
||||
GET /api/get-price-of-all
|
||||
Content-Type: application/json
|
||||
```
|
||||
Response ``Http.Status.OK`` with ``JSON``:
|
||||
Response `200` with ``JSON``:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -137,7 +137,7 @@ Response ``Http.Status.OK`` with ``JSON``:
|
||||
|
||||
|
||||
* * *
|
||||
###Create a new product.
|
||||
### Create a new product.
|
||||
The service will handle `POST` request `/api/product/add`, by adding `Product` to database.
|
||||
|
||||
```json
|
||||
@ -153,7 +153,7 @@ Content-Type: application/json
|
||||
"imageLink": String
|
||||
}
|
||||
```
|
||||
Response `HttpStatus.CREATED` with `JSON`
|
||||
Response `201` with `JSON`
|
||||
|
||||
```json
|
||||
|
||||
@ -168,7 +168,7 @@ Response `HttpStatus.CREATED` with `JSON`
|
||||
```
|
||||
|
||||
* * *
|
||||
###Delete product with `id`.
|
||||
### Delete product with `id`.
|
||||
The service will handle `DELETE` request `/api/delete-product`, by
|
||||
|
||||
```json
|
||||
@ -182,12 +182,12 @@ Content-Type: application/json
|
||||
```
|
||||
```json
|
||||
|
||||
Response: HttpStatus.OK
|
||||
Response: 200
|
||||
|
||||
```
|
||||
* * *
|
||||
|
||||
###Get product with `id`
|
||||
### Get product with `id`
|
||||
The service wil handle `GET` request `/api/product/get-by-id`, by returning product with `id`.
|
||||
|
||||
```json
|
||||
@ -199,7 +199,7 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
Response ``Http.Status.OK`` with `JSON`:
|
||||
Response `200` with `JSON`:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -214,7 +214,7 @@ Response ``Http.Status.OK`` with `JSON`:
|
||||
|
||||
* * *
|
||||
|
||||
###Update product
|
||||
### Update product
|
||||
The service will handle ``POST`` request `/api/product/update/{id}` with path variable `id`, by updating existing product. In request
|
||||
`id` is required, fields which won't be modified should be `null`.
|
||||
|
||||
@ -233,7 +233,7 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
Response ``Http.Status.OK`` with `JSON`:
|
||||
Response `200` with `JSON`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user