You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-22Lines changed: 24 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,37 +7,39 @@
7
7
8
8
# Mock API
9
9
10
-
App criado para fazer mock com REST utilizando JSON
10
+
App created to mock with REST using JSON.
11
11
12
-
## Regras
12
+
## Rules
13
13
14
-
Quando uma request é feita é seguido o seguinte fluxo:
14
+
When a request is made the following flow is followed:
15
15
16
-
*Existe na pasta do mock (conforme a propriedade`api.fileBase`)? Caso sim, retorna o mock
17
-
*A uri se encaixa em algum pattern da lista de `api.uriConfigurations[].pattern`? Caso sim, vai redirecionar conforme a configuração e fazer fazer cache conforme o field`backup`
18
-
*Se não entrar nos fluxos anteriores, vai redirecionar para o host padrão`api.host`
16
+
*Does it exist in the mock folder (as per the`api.fileBase` property)? If so, return the mock.
17
+
*Does the uri fit into any pattern in the `api.uriConfigurations[]. Pattern` list? If so, it will redirect according to the configuration and cache according to the`backup` field.
18
+
*If it does not enter the previous flows, it will redirect to the default host`api.host`
19
19
20
-
## Requisitos
20
+
## Requirements
21
21
* Java JDK 8
22
22
* Gradle 4
23
23
24
24
## Run
25
25
26
-
## Usando seu arquivo de propriedades
27
-
Crie seu arquivo de propriedade `src/main/resources/application-custom.yml` e rode com o argumento `-Dspring.profiles.active=custom`. Exemplo:
26
+
## Using Your Property File
27
+
Create your `src / main / resources / application-custom.yml` property file and run it with the` -Dspring.profiles.active = custom` argument. Example:
28
+
28
29
```
29
30
gradle bootRun -Dspring.profiles.active=custom
30
31
```
31
32
32
-
## Usando imagem Docker
33
-
Para gerar a imagem Docker do projeto, execute:
33
+
## Using Docker Image
34
+
To generate the project Docker image, run:
35
+
34
36
```
35
37
gradle buildDocker
36
38
```
37
39
38
-
Por padrão, o nome da imagem será`elemental-source/mock-api:VERSAO`.
40
+
By default, the image name will be`elemental-source / mock-api:VERSAO`.
39
41
40
-
Para rodar a aplicação, crie dois diretórios: um contendo o arquivo de configuração `application-custom.yml`e o outro contendo os arquivos de mock. Execute então:
42
+
To run the application, create two directories: one containing the `application-custom.yml`configuration file and the other containing the mock files. Then run:
41
43
42
44
```
43
45
docker run -d --name mock-api \
@@ -47,14 +49,14 @@ docker run -d --name mock-api \
47
49
elemental-source/mock-api:VERSAO
48
50
```
49
51
50
-
A porta `9090`expõe o serviço enquanto a porta `5000`é utilizada para debug da aplicação.
52
+
The `9090`port exposes the service while the`5000`port is used to debug the application.
51
53
52
-
Para visualizar os logs da aplicação a partir do container: `docker logs -f mock-api`
54
+
To view the application logs from the container: `docker logs -f mock-api`
53
55
54
-
## TODO
55
-
-[X]Corrigir Code Style
56
-
-[ ]Inserir exemplo do "arquivo de propriedades" no README
57
-
-[ ]Separar testes unitários dos testes integrados
58
-
-[ ]Corrigir os testes ignorados
59
-
-[ ]Revisar dependências (ver, por exemplo, se é mesmo necessário ter o GSON ou modelmapper)
60
-
-[ ]Usar objectmapper como component: `compile('com.fasterxml.jackson.datatype:jackson-datatype-jdk8')`
56
+
## ALL
57
+
-[X]Correct Code Style
58
+
-[ ]Insert example of "property file" in README
59
+
-[ ]Separate unit tests from integrated tests
60
+
-[ ]Fix skipping tests
61
+
-[ ]Review dependencies (see, for example, if it is even necessary to have the GSON or modelmapper)
62
+
-[ ]Use objectmapper as component: `compile('com.fasterxml.jackson.datatype:jackson-datatype-jdk8')``
0 commit comments