From b7415adfa335cd643e11846fb94e28db487f5495 Mon Sep 17 00:00:00 2001 From: Jan Friedli Date: Mon, 13 Jul 2020 08:42:30 +0200 Subject: [PATCH] added version and title --- README.md | 2 ++ main.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 35c61b0..c90012a 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,8 @@ If you want to add/remove dependencies you have to rebuild the container. # RESTful API +If you go to https://matweb.info/apidocs you can find a Swagger documentation. + ## Upload Endpoint **Endpoint:** `/api/upload` diff --git a/main.py b/main.py index 5e47531..cf75e2d 100644 --- a/main.py +++ b/main.py @@ -14,6 +14,10 @@ def create_app(test_config=None): app.config['UPLOAD_FOLDER'] = os.environ.get('MAT2_WEB_DOWNLOAD_FOLDER', './uploads/') app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB app.config['CUSTOM_TEMPLATES_DIR'] = 'custom_templates' + app.config['SWAGGER'] = { + 'title': 'Mat2 Web API', + 'version': '1.0.0', + } # optionally load settings from config.py app.config.from_object('config')