Sha256: ea8d5d4a5470350e778e0d18ceaa188b16df5f5399126c788fbc2c27d3e50061

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

Stored size: 595 Bytes

Contents

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

          def call
            report['mapping_rules'] = {}
            operations.each do |op|
              Entities::MappingRule.create(service: service,
                                           attrs: op.mapping_rule)
              logger.info "Created #{op.http_method} #{op.pattern} endpoint"
              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_mapping_rule_step.rb
3scale_toolbox-1.0.0 lib/3scale_toolbox/commands/import_command/openapi/create_mapping_rule_step.rb
3scale_toolbox-0.20.0 lib/3scale_toolbox/commands/import_command/openapi/create_mapping_rule_step.rb