From 5c17019896563ef4f3511f55ac2abe61fa7070ec Mon Sep 17 00:00:00 2001 From: Rovanion Luckey Date: Fri, 1 Jun 2018 17:36:09 +0200 Subject: [PATCH] Allow function names for end points to be camelCased. I have no idea what the rammifications of this change is in the larger scope of this code base and its user. All I really know is that this change to flask_apispec enables it to publish swagger documentation for my project, which uses camelCased function names. --- flask_apispec/apidoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_apispec/apidoc.py b/flask_apispec/apidoc.py index 7a44f6a..a93b085 100644 --- a/flask_apispec/apidoc.py +++ b/flask_apispec/apidoc.py @@ -21,7 +21,7 @@ def __init__(self, app): self.app = app def convert(self, target, endpoint=None, blueprint=None, **kwargs): - endpoint = endpoint or target.__name__.lower() + endpoint = endpoint or target.__name__ if blueprint: endpoint = '{}.{}'.format(blueprint, endpoint) rules = self.app.url_map._rules_by_endpoint[endpoint]