module ThreeScaleToolbox::Commands::ImportCommand::OpenAPI::Step

Attributes

context[R]

Public Class Methods

new(context) click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 8
def initialize(context)
  @context = context
end

Public Instance Methods

api_spec() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 22
def api_spec
  context[:api_spec]
end
backend_api_host_header() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 96
def backend_api_host_header
  context[:backend_api_host_header]
end
backend_api_secret_token() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 92
def backend_api_secret_token
  context[:backend_api_secret_token]
end
base_path() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 104
def base_path
  api_spec.base_path || '/'
end
build_3scale_operations() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 37
def build_3scale_operations
  api_spec.operations.map do |op|
    Operation.new(
      base_path: base_path,
      public_base_path: public_base_path,
      path: op[:path],
      verb: op[:verb],
      operationId: op[:operation_id],
      description: op[:description],
      prefix_matching: prefix_matching,
    )
  end
end
default_credentials_userkey() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 68
def default_credentials_userkey
  context[:default_credentials_userkey]
end
oidc_issuer_endpoint() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 64
def oidc_issuer_endpoint
  context[:oidc_issuer_endpoint]
end
oidc_issuer_type() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 60
def oidc_issuer_type
  context[:oidc_issuer_type]
end
operations() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 30
def operations
  # api_spec.operations are readonly
  # store operations in context
  # each operation can be extended with extra information to be used later
  context[:operations] ||= build_3scale_operations
end
override_private_base_url() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 88
def override_private_base_url
  context[:override_private_base_url]
end
override_private_basepath() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 72
def override_private_basepath
  context[:override_private_basepath]
end
override_public_basepath() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 76
def override_public_basepath
  context[:override_public_basepath]
end
prefix_matching() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 100
def prefix_matching
  context[:prefix_matching]
end
private_base_path() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 112
def private_base_path
  override_private_basepath || base_path
end
production_public_base_url() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 80
def production_public_base_url
  context[:production_public_base_url]
end
public_base_path() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 108
def public_base_path
  override_public_basepath || base_path
end
resource() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 56
def resource
  context[:api_spec_resource]
end
service() click to toggle source

Can be nil on initialization time and not nil afterwards method to fetch from context required

# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 14
def service
  context[:target]
end
service=(service) click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 18
def service=(service)
  context[:target] = service
end
staging_public_base_url() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 84
def staging_public_base_url
  context[:staging_public_base_url]
end
target_system_name() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 51
def target_system_name
  # could be nil
  context[:target_system_name]
end
threescale_client() click to toggle source
# File lib/3scale_toolbox/commands/import_command/openapi/step.rb, line 26
def threescale_client
  context[:threescale_client]
end