Sha256: 8e9c6644bdce469733440e5e23816b42ff3504ade5d2403fb848cfbc7c5accde

Contents?: true

Size: 547 Bytes

Versions: 3

Compression:

Stored size: 547 Bytes

Contents

module ThreeScaleToolbox
  module Commands
    module ImportCommand
      module OpenAPI
        class CreateBackendMappingRulesStep
          include Step

          def call
            backend.mapping_rules.each(&:delete)

            report['mapping_rules'] = {}
            operations.each do |op|
              b_m_r = Entities::BackendMappingRule.create(backend: backend, attrs: op.mapping_rule)
              report['mapping_rules'][op.friendly_name] = op.mapping_rule
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
3scale_toolbox-1.0.1 lib/3scale_toolbox/commands/import_command/openapi/create_backend_mapping_rule_step.rb
3scale_toolbox-1.0.0 lib/3scale_toolbox/commands/import_command/openapi/create_backend_mapping_rule_step.rb
3scale_toolbox-0.20.0 lib/3scale_toolbox/commands/import_command/openapi/create_backend_mapping_rule_step.rb