class Swaggard::Swagger::Parameters::Path

Attributes

name[R]
operation[R]

Public Class Methods

new(operation, param_name) click to toggle source
# File lib/swaggard/swagger/parameters/path.rb, line 10
def initialize(operation, param_name)
  @operation = operation
  @in = 'path'
  @name = param_name.to_s
  @data_type = 'string'
  @is_required = true
end

Public Instance Methods

description() click to toggle source
# File lib/swaggard/swagger/parameters/path.rb, line 18
def description
  @description ||= get_description
end

Private Instance Methods

get_description() click to toggle source
# File lib/swaggard/swagger/parameters/path.rb, line 24
def get_description
  if Swaggard.configuration.path_parameter_description.respond_to?(:call)
    Swaggard.configuration.path_parameter_description.call(self)
  else
    Swaggard.configuration.path_parameter_description
  end
end