Skip to content

Commit d6a2e12

Browse files
committed
Merge branch 'task/updated-documentation'
2 parents 71d7648 + 262700e commit d6a2e12

File tree

2 files changed

+25
-28
lines changed

2 files changed

+25
-28
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ if __name__ == '__main__':
6565
config.yml
6666
```yaml
6767
pyms:
68-
services: # 1.2
69-
requests:
70-
data: {}
71-
config: # 1.3
72-
DEBUG: true
73-
APP_NAME: business-glossary
74-
APPLICATION_ROOT : ""
75-
SECRET_KEY: "gjr39dkjn344_!67#"
68+
services: # 1.2
69+
requests:
70+
data: {}
71+
config: # 1.3
72+
DEBUG: true
73+
APP_NAME: business-glossary
74+
APPLICATION_ROOT : ""
75+
SECRET_KEY: "gjr39dkjn344_!67#"
7676
```
7777
7878
### So what did that code do?

docs/configuration.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,29 @@ a simple configuration file could be a config.yaml:
1919
```yaml
2020
pyms:
2121
services:
22-
requests: true
23-
swagger:
24-
path: ""
25-
file: "swagger.yaml"
26-
config:
27-
debug: true
28-
testing: false
29-
app_name: "Python Microservice"
30-
APPLICATION_ROOT: ""
22+
requests: true
23+
swagger:
24+
path: ""
25+
file: "swagger.yaml"
26+
config:
27+
debug: true
28+
testing: false
29+
app_name: "Python Microservice"
30+
APPLICATION_ROOT: ""
3131
```
3232
3333
or in a config.json:
3434
3535
```json
3636
{
3737
"pyms": {
38-
"services":{
39-
"requests": true,
40-
"swagger": {
41-
"path": "",
42-
"file": "swagger.yaml"
43-
}
44-
},
38+
"services":{
39+
"requests": true,
40+
"swagger": {
41+
"path": "",
42+
"file": "swagger.yaml"
43+
}
44+
},
4545
"config": {
4646
"DEBUG": true,
4747
"TESTING": true,
@@ -75,7 +75,7 @@ and a `config.yaml` file:
7575
```yaml
7676
pyms:
7777
services:
78-
requests: true
78+
requests: true
7979
```
8080
8181
our object `ms` has an attribute `requests` that is a instance of our service [requests](services.md).
@@ -132,9 +132,6 @@ API = Api(
132132
)
133133
```
134134

135-
**IMPORTANT:** If you use this method to get configuration out of context, you must set the `CONFIGMAP_SERVICE` or set
136-
the default key `ms` for your configuration block in your config.yml
137-
138135

139136
## Looking for Configuration file with Kubernetes Configmaps
140137
By default, Microservice class search a config.yml in the same path. You can set a different route or set a json file.

0 commit comments

Comments
 (0)