Class: OpenAPI::Loader::Denormalizer::Parameters
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- OpenAPI::Loader::Denormalizer::Parameters
- Defined in:
- lib/open_api/loader/denormalizer/parameters.rb
Overview
Denormalizes all the ‘parameters’ definitions by moving them from the root OpenAPI object and path objects right into the corresponding operation objects.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/open_api/loader/denormalizer/parameters.rb', line 10 def call root_params = extract_from(self) paths.each do |path| path_params = extract_from(path, root_params) operations(path).each do |operation| parameters = extract_from(operation, path_params) operation["parameters"] = parameters if parameters.any? end end end |