From 32f810df6bdd73c1db1a3095e6cf22b44e0aa232 Mon Sep 17 00:00:00 2001 From: Quan Duong Date: Thu, 19 Jul 2018 22:34:31 +0300 Subject: [PATCH] Exclude OPTIONS method from operation list --- 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 239c673..c2d06b3 100644 --- a/flask_apispec/apidoc.py +++ b/flask_apispec/apidoc.py @@ -45,7 +45,7 @@ def get_path(self, rule, target, **kwargs): 'operations': { method.lower(): self.get_operation(rule, view, parent=parent) for method, view in six.iteritems(operations) - if method.lower() in (set(VALID_METHODS) - {'head'}) + if method.lower() in (set(VALID_METHODS) - {'head', 'options'}) }, }