Sha256: bd20daf09c687d515c378d40fe3b391cd3fbbb026434090e06f327085d03a0b2

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

module OpenAPI::Loader
  #
  # Denormalizes OAS3 `parameters`, `servers`, and `security`
  # by moving them from OpenAPI root and Path objects
  # right into the corresponding Operation objects.
  #
  # @private
  #
  class Denormalizer
    require_relative "denormalizer/parameters"
    require_relative "denormalizer/security"
    require_relative "denormalizer/servers"
    require_relative "denormalizer/variables"

    extend Dry::Initializer
    extend ConstructorShortcut[:call] # class-level .call

    param :source

    def call
      WRAPPERS.each { |wrapper| wrapper.new(source).call }
      source
    end

    WRAPPERS = [Parameters, Security, Servers, Variables].freeze
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
open_api-loader-0.0.1 lib/open_api/loader/denormalizer.rb