0
votes

I am developing a website using Flask and Flask Restplus. I tried to use Google App Engine to deploy the app, however when I run dev_appserver.py on my computer, all the swagger-ui files cannot be found. I have no ideas why this happens? Can anyone tell me how to solve this?

Here is the example logs 404 for the resource:

INFO     2017-06-14 04:21:52,859 module.py:809] default: "GET /api/ HTTP/1.1" 200 3710
INFO     2017-06-14 04:21:53,113 module.py:809] default: "GET /swaggerui/bower/swagger-ui/dist/css/screen.css HTTP/1.1" 404 233
INFO     2017-06-14 04:21:53,113 module.py:809] default: "GET /swaggerui/bower/swagger-ui/dist/lib/jquery.slideto.min.js HTTP/1.1" 404 233
INFO     2017-06-14 04:21:53,115 module.py:809] default: "GET /swaggerui/bower/swagger-ui/dist/lib/object-assign-pollyfill.js HTTP/1.1" 404 233
INFO     2017-06-14 04:21:53,121 module.py:809] default: "GET /swaggerui/bower/swagger-ui/dist/css/typography.css HTTP/1.1" 404 233
1

1 Answers

0
votes

You need to put swaggerui inside your project. I suggest making a libs directory at the root of your project (same level as app.yaml).

Then, use GAE's vendoring method. To use vendoring, create (or modify) appengine_config.py in the root of your project, as follows:

from google.appengine.ext import vendor

# Add 3rd party libraries in the "libs" folder.
vendor.add('libs')