The purpose of this plugin is to create an environment where the developer can test his front end or other backend programs without having to have the services running in the staging environment or locally. With gary plugin you can test your applications locally without the need for real services.
https://docs.docker.com/desktop/install/windows-install/
Go inside the stack project folder and type the command:
$ cd onde-esta-minha-stack
install de plugin using stack command
$ stk add plugin https://github.com/slackwarecps/plugin-gary-mock-server
you can verify using the command on cli:
$ stk list plugin
+------------------+---------------------------------------------------------+-----------------+
| name | description | version(latest) |
+------------------+---------------------------------------------------------+-----------------+
| plugin-gary-mock | Adiciona uma pasta com um mock server para nao depender | no release |
| | de servidores online | |
+------------------+---------------------------------------------------------+-----------------+
$cd plugin-gary-mock
$ docker-compose up
CURL command to import in POSTMAN
curl --location --request GET 'localhost:1080/api/v1/quem-eh-o-batman'
-
Administration dashboard
File: initializer.json
[
{
"httpRequest": {
"path": "/api/v1/cores"
},
"httpResponse": {
"body":[
{
"id": 1,
"nome": "Verde de Fome"
},
{
"id": 4,
"nome": "Vermelho apagado"
},
{
"id": 26,
"nome": "Azul Campinas"
}
]
}
},
{
"httpRequest": {
"path": "/api/v1/quem-eh-o-batman"
},
"httpResponse": {
"body": "eh o Bruce wayne"
}
}
]
Download Example Postman Collection
be happy!

