Skip to content

Commit

Permalink
Allow overriding security spec with empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
jlumpe committed Sep 27, 2016
1 parent c766bf2 commit d8f7684
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bravado_core/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def security_objects(self):
deref = self.swagger_spec.deref
op_spec = deref(self.op_spec)
spec_dict = deref(self.swagger_spec.spec_dict)
security_spec = deref(op_spec.get('security', []))
if len(security_spec) == 0:
if 'security' in op_spec:
security_spec = deref(op_spec['security'])
else:
security_spec = spec_dict.get('security', [])
security_defs_dict = spec_dict.get('securityDefinitions', {})

Expand Down

0 comments on commit d8f7684

Please sign in to comment.