Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from apispec import BasePlugin

from odoo.addons.base_rest.tools import ROUTING_DECORATOR_ATTR


class RestMethodSecurityPlugin(BasePlugin):
def __init__(self, service):
Expand All @@ -18,7 +20,7 @@ def init_spec(self, spec):
spec.components.security_scheme("api_key", api_key_scheme)

def operation_helper(self, path=None, operations=None, **kwargs):
routing = kwargs.get("routing")
routing = kwargs.get(ROUTING_DECORATOR_ATTR)
if not routing:
super().operation_helper(path, operations, **kwargs)
if not operations:
Expand Down