Skip to content

Commit

Permalink
Fix Flask 2x Support (#233)
Browse files Browse the repository at this point in the history
* Skip static rules

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: #230

* Update changelog

Co-authored-by: Steven Loria <[email protected]>
  • Loading branch information
KyleJamesWalker and sloria authored Mar 30, 2022
1 parent de6f5ad commit 74fb204
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
---------

0.11.1 (unreleased)
*******************

Bug fixes:

* Fix Flask 2.x support (:issue:`229`). Thanks :user:`KyleJamesWalker` for the PR.


0.11.0 (2020-10-25)
*******************

Expand Down
4 changes: 4 additions & 0 deletions flask_apispec/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def register_existing_resources(self):
except ValueError:
blueprint_name = None

# Skip static rules
if name == 'static':
continue

try:
self.register(rule, blueprint=blueprint_name)
except TypeError:
Expand Down

0 comments on commit 74fb204

Please sign in to comment.