luolingchun / flask-openapi3

Generate REST API and OpenAPI documentation for your Flask project.
https://luolingchun.github.io/flask-openapi3/
MIT License
189 stars 29 forks source link

async routes not working #48

Closed btcorgtfo closed 1 year ago

btcorgtfo commented 1 year ago

hi,

unfortunately async def routes are not working with an

app = OpenAPI(__name__)

simple route which should work

@app.get("/async_test")
async def async_test():
    return "hi"

if i change to app = Flask(__name__) the route returns "hi".

any chance this is only a small issue, so async routes can be used with OpenAPI3?

luolingchun commented 1 year ago

Currently, the async api is not supported. I will add support in the next version.

luolingchun commented 1 year ago

I have completed the preliminary support in PR #49 .

btcorgtfo commented 1 year ago

should have checked this single open PR first before complaining. Thanks!