Skip to content

Commit ef8c1f4

Browse files
committed
Allow OPENAPI_URL_PREFIX to be '/'
1 parent 2f0544a commit ef8c1f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_rest_api/spec/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def register_field(self, field, *args):
6666

6767
def _add_leading_slash(string):
6868
"""Add leading slash to a string if there is None"""
69-
return string if string[0] == '/' else '/' + string
69+
return string if string.startswith('/') else '/' + string
7070

7171

7272
class DocBlueprintMixin:

0 commit comments

Comments
 (0)