Class: OpenAPI::Loader::Denormalizer::Security

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/open_api/loader/denormalizer/security.rb

Overview

Denormalizes all the ‘security’ definitions by moving them from the root OpenAPI object right into the corresponding operation objects.

Instance Method Summary collapse

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'lib/open_api/loader/denormalizer/security.rb', line 10

def call
  default = delete "security"
  operations.each do |operation|
    operation["security"] ||= default if default
  end
end