Skip to content

Commit

Permalink
feat(config)!: add configuration option for determining public data #312
Browse files Browse the repository at this point in the history
  • Loading branch information
VKTB committed Feb 8, 2022
1 parent b3bb508 commit 58e777b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datagateway_api/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"search_api": {
"extension": "/search-api",
"icat_url": "https://localhost:8181",
"icat_check_cert": false
"icat_check_cert": false,
"num_of_years_determining_public_data": 3
},
"flask_reloader": false,
"log_level": "WARN",
Expand Down
1 change: 1 addition & 0 deletions datagateway_api/src/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class SearchAPI(BaseModel):
extension: StrictStr
icat_check_cert: StrictBool
icat_url: StrictStr
num_of_years_determining_public_data: StrictInt

_validate_extension = validator("extension", allow_reuse=True)(validate_extension)

Expand Down
1 change: 1 addition & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def test_config_data():
"extension": "/search-api",
"icat_url": "https://localhost.testdomain:8181",
"icat_check_cert": True,
"num_of_years_determining_public_data": 3,
},
"flask_reloader": False,
"log_level": "WARN",
Expand Down

0 comments on commit 58e777b

Please sign in to comment.