Skip to content

Commit 74fb204

Browse files
Fix Flask 2x Support (#233)
* 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]>
1 parent de6f5ad commit 74fb204

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
---------
33

4+
0.11.1 (unreleased)
5+
*******************
6+
7+
Bug fixes:
8+
9+
* Fix Flask 2.x support (:issue:`229`). Thanks :user:`KyleJamesWalker` for the PR.
10+
11+
412
0.11.0 (2020-10-25)
513
*******************
614

flask_apispec/extension.py

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ def register_existing_resources(self):
103103
except ValueError:
104104
blueprint_name = None
105105

106+
# Skip static rules
107+
if name == 'static':
108+
continue
109+
106110
try:
107111
self.register(rule, blueprint=blueprint_name)
108112
except TypeError:

0 commit comments

Comments
 (0)