Sha256: 3d8f06e5261d903ffb8c44b26fa6533bf61b07f8c671ce4b6bd0eea9ca83b3f4

Contents?: true

Size: 766 Bytes

Versions: 10

Compression:

Stored size: 766 Bytes

Contents

require_relative 'base'

module Swaggard
  module Swagger
    module Parameters
      class Path < Base

        attr_reader :operation, :name

        def initialize(operation, param_name)
          @operation = operation
          @in = 'path'
          @name = param_name.to_s
          @data_type = 'string'
          @is_required = true
        end

        def description
          @description ||= get_description
        end

        private

        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
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
swaggard-1.5.1 lib/swaggard/swagger/parameters/path.rb
swaggard-1.5.0 lib/swaggard/swagger/parameters/path.rb
swaggard-1.4.0 lib/swaggard/swagger/parameters/path.rb
swaggard-1.3.0 lib/swaggard/swagger/parameters/path.rb
swaggard-1.2.0 lib/swaggard/swagger/parameters/path.rb
swaggard-1.1.1 lib/swaggard/swagger/parameters/path.rb
swaggard-1.1.0 lib/swaggard/swagger/parameters/path.rb
swaggard-1.0.2 lib/swaggard/swagger/parameters/path.rb
swaggard-1.0.1 lib/swaggard/swagger/parameters/path.rb
swaggard-1.0.0 lib/swaggard/swagger/parameters/path.rb