jmcarp / flask-apispec

MIT License
655 stars 156 forks source link

Fix Flask 2x Support #233

Closed KyleJamesWalker closed 2 years ago

KyleJamesWalker commented 2 years ago

When using Flask 2x the send_static_file function is a lambda and crashes the extraction of the rules_by_endpoint function. There is currently a PR that has a fix but it's been stale so I'm adding this as a possible alternate fix.

The other fix is: https://github.com/jmcarp/flask-apispec/pull/230

Closes https://github.com/jmcarp/flask-apispec/issues/229

Note the unit tests were failing before this PR, they are now working again.

If anyone wants to use this version while we wait to have it merged and released I was able to add the following to my setup.py:

"flask-apispec @ https://github.com/KyleJamesWalker/flask-apispec/tarball/fix-send-static-file-lambda-flask-v2#egg=flask-apispec-0.11.0"
KyleJamesWalker commented 2 years ago

@sloria it looks like you also might be a maintainer of this repo.

sloria commented 2 years ago

sorry for the delay; i'm not super active on this project. i'll merge and release this when i have some time off the clock.

KyleJamesWalker commented 2 years ago

No worries, thank you!