diff --git a/dockereve-master/eve-app/app.py b/dockereve-master/eve-app/app.py index e482917..81c4f22 100644 --- a/dockereve-master/eve-app/app.py +++ b/dockereve-master/eve-app/app.py @@ -20,7 +20,7 @@ def check_auth(self, token, allowed_roles, resource, method): # required. See http://swagger.io/specification/#infoObject for details. app.config['SWAGGER_INFO'] = { 'title': 'MRIQC Web API', - 'version': '0.1', + 'version': 'v1', 'description': 'MRI Quality Control Metrics Repository', } diff --git a/dockereve-master/eve-app/settings.py b/dockereve-master/eve-app/settings.py index 5bbc0fb..8664c56 100644 --- a/dockereve-master/eve-app/settings.py +++ b/dockereve-master/eve-app/settings.py @@ -549,6 +549,9 @@ settings = { + 'URL_PREFIX': 'api', + 'API_VERSION': 'v1', + 'ALLOWED_FILTERS': ['*'], 'MONGO_HOST': os.environ.get('MONGODB_HOST', ''), 'MONGO_PORT': os.environ.get('MONGODB_PORT', ''), 'MONGO_DBNAME': 'mriqc_api', diff --git a/dockereve-master/nginx/sites-enabled/eve_project b/dockereve-master/nginx/sites-enabled/eve_project index 4260e20..258e4d2 100644 --- a/dockereve-master/nginx/sites-enabled/eve_project +++ b/dockereve-master/nginx/sites-enabled/eve_project @@ -11,7 +11,7 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - location /docs/ { + location = / { proxy_pass http://swagger_ui:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/test/testGetPost.py b/test/testGetPost.py index 1bb6447..a6003ec 100644 --- a/test/testGetPost.py +++ b/test/testGetPost.py @@ -33,8 +33,8 @@ def getRequest(post_resp, url): authenticated_header = header.copy() authenticated_header['Authorization'] = os.environ.get('API_TOKEN', '') numOfTestData = 84 -urlBold = "http://0.0.0.0:80/bold" -urlT1w = "http://0.0.0.0:80/T1w" +urlBold = "http://0.0.0.0:80/api/v1/bold" +urlT1w = "http://0.0.0.0:80/api/v1/T1w" codeForInvalid = 422