简体   繁体   中英

Swagger-codegen flask generated server locally doesn't works

I have generated a simple API server example using swaggerhub, and downloaded python-flask generated server locally.

Unfortunately, it seems to not work at all. Every time I try to access the indicated url, that is

http://localhost:8080/data/2.5//ui/

it returns me a 404 error.

I've tried all the solutions reported on:

Python connexion not displaying Swagger UI

but with no success. What am I missing?

A very simple detail that made all work: after executing pip install 'connexion[swagger-ui]' and pip install pathlib swagger_ui_bundle (though I am not sure the last is strictly needed...), the server worked only with an invalidate cache and restart command on PyCharm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM