forked from Laboratoria/burger-queen-api-mock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
3,679 additions
and
3,650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
coverage/ | ||
node_modules/ | ||
.DS_Store | ||
*.log | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
coverage/ | ||
node_modules/ | ||
.DS_Store | ||
*.log | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,38 @@ | ||
# Burger Queen API Mock | ||
Usando las librerías [json-server](https://github.com/typicode/json-server) | ||
y [json-server-auth](https://github.com/jeremyben/json-server-auth) | ||
se crea un mock para | ||
[Burger Queen API](https://app.swaggerhub.com/apis/ssinuco/BurgerQueenAPI/2.0.0) | ||
|
||
## Ejecución | ||
1. Clona el repositorio lalala | ||
2. Instala las dependencias | ||
```bash | ||
npm install | ||
``` | ||
3. Ejecuta el mock | ||
```bash | ||
npm start | ||
``` | ||
4. Ahora puedes acceder a los endpoints del API descritos en la | ||
[documentación](https://app.swaggerhub.com/apis/ssinuco/BurgerQueenAPI/2.0.0) | ||
usando como URL base [http://localhost:8080/](http://localhost:8080/). | ||
|
||
Tal como indica la documentación, los endpoints están protegidos | ||
por token de autenticación. | ||
|
||
En el archivo [requests.http](./requests.http) encuentras | ||
algunas peticiones de prueba que puedes ejecutar directamente | ||
en VSCode usando la extensión | ||
[REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client). | ||
|
||
## Información | ||
|
||
El mock _out-of-the-box_ provee información de 2 usuarias administradoras [email protected]_ y [email protected]_. La contraseña de ambos usuarios es _123456_ | ||
|
||
También provee información de 2 órdenes y 2 productos. | ||
======= | ||
# Burger Queen API Mock | ||
|
||
Usando las librerías [json-server](https://github.com/typicode/json-server) | ||
y [json-server-auth](https://github.com/jeremyben/json-server-auth) | ||
|
@@ -7,7 +41,7 @@ se crea un mock para | |
|
||
## Ejecución | ||
|
||
1. Clona el repositorio lalala | ||
1. Clona el repositorio | ||
2. Instala las dependencias | ||
```bash | ||
npm install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,66 +2,66 @@ | |
"orders": [ | ||
{ | ||
"id": 1, | ||
"userId": 1, | ||
"client": "Jude Milhon", | ||
"userId": "1", | ||
"client": "Mislene", | ||
"products": [ | ||
{ | ||
"qty": 1, | ||
"product": { | ||
"id": 1, | ||
"name": "Sandwich de jamón y queso", | ||
"price": 1000, | ||
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/sandwich.jpg", | ||
"type": "Desayuno", | ||
"dateEntry": "2022-03-05 15:14:10" | ||
} | ||
}, | ||
{ | ||
"qty": 1, | ||
"product": { | ||
"id": 2, | ||
"name": "Café americano", | ||
"price": 500, | ||
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/coffe.jpg", | ||
"type": "Desayuno", | ||
"dateEntry": "2022-03-05 15:14:10" | ||
"id": "1", | ||
"name": "Anéis de cebola", | ||
"price": "5", | ||
"image": "https://imgbox.com/bF8IBK4m", | ||
"type": "Almoço", | ||
"dataEntry": "2023-08-16 20:28:10" | ||
} | ||
} | ||
], | ||
"status": "pending", | ||
"dataEntry": "2022-03-05 15:00" | ||
"dateEntry": "2023-08-16 20:28:10", | ||
"dateProcessed": "2023-08-17 16:00" | ||
}, | ||
{ | ||
"id": 2, | ||
"userId": 2, | ||
"client": "Katie Bouman", | ||
"userId": "2", | ||
"client": "Vitória", | ||
"products": [ | ||
{ | ||
"qty": 2, | ||
"product": { | ||
"id": 2, | ||
"name": "Café americano", | ||
"price": 500, | ||
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/coffe.jpg", | ||
"type": "Desayuno", | ||
"dateEntry": "2022-03-05 15:14:10" | ||
"id": "6", | ||
"name": "Hambúrguer duplo", | ||
"price": "15", | ||
"image": "https://imgbox.com/6gp2IPLd", | ||
"type": "Almoço", | ||
"dataEntry": "2023-08-16 20:28:10" | ||
} | ||
}, | ||
} | ||
], | ||
"status": "pending", | ||
"dateEntry": "2023-08-16 20:28:10", | ||
"dateProcessed": "2023-08-17 16:00" | ||
}, | ||
{ | ||
"id": 3, | ||
"userId": "3", | ||
"client": "Mo", | ||
"products": [ | ||
{ | ||
"qty": 1, | ||
"qty": 3, | ||
"product": { | ||
"id": 3, | ||
"name": "Agua 500ml", | ||
"price": 500, | ||
"image": "https://github.com/Laboratoria/bootcamp/tree/main/projects/04-burger-queen-api/resources/images/water.jpg", | ||
"type": "Almuerzo", | ||
"dateEntry": "2022-03-05 15:14:10" | ||
"id": "1", | ||
"name": "Café Americano", | ||
"price": "5", | ||
"image": "https://imgbox.com/DCERopVE", | ||
"type": "Café da manha", | ||
"dataEntry": "2023-08-16 20:28:10" | ||
} | ||
} | ||
], | ||
"status": "delivered", | ||
"dataEntry": "2022-03-05 15:00", | ||
"dateProcessed": "2022-03-05 16:00" | ||
"status": "pending", | ||
"dateEntry": "2023-08-16 20:28:10", | ||
"dateProcessed": "2023-08-17 16:00" | ||
} | ||
], | ||
"products": [ | ||
|
@@ -178,13 +178,8 @@ | |
"id": 2 | ||
}, | ||
{ | ||
<<<<<<< Updated upstream | ||
"email": "[email protected]", | ||
"password": "$2a$10$/xHIoXvgEBpG4KSMgBuhN.tS5WnoMDolpg.y2xj77wvSGQv6kUvNu", | ||
======= | ||
"email": "[email protected]", | ||
"password": "$2a$10$DOzn3gE9JqbE.iDSpq/LAuBztyObXiZxx2c9mu/o7fRQTbjwdrOze", | ||
>>>>>>> Stashed changes | ||
"role": "admin", | ||
"id": 3 | ||
} | ||
|
Oops, something went wrong.