Sha256: 03fac23780b8b6d75dc3472edf87eaaeb40d0c91d307793afa11bac9c3575ebb

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

module ThreeScaleToolbox
  module Commands
    module ImportCommand
      module OpenAPI
        module Method
          def method
            {
              'friendly_name' => friendly_name,
              'system_name' => system_name
            }
          end

          def friendly_name
            operation[:operationId] || operation_id
          end

          def system_name
            friendly_name.downcase.gsub(/[^\w]/, '_')
          end

          def operation_id
            "#{operation[:verb]}#{operation[:path].gsub(/[^\w]/, '')}"
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
3scale_toolbox-0.11.0 lib/3scale_toolbox/commands/import_command/openapi/method.rb