class SwaggerDocsGenerator::Actions::Path

Write parameter type :path

Public Instance Methods

to_hash() click to toggle source
# File lib/swagger_docs_generator/parser/actions/parameters/path.rb, line 10
def to_hash
  {
    in:               :path,
    name:             @name.nil? ? 'path' : @name,
    description:      @description.nil? ? '' : @description,
    required:         @required.nil? ? true : @required,
    type:             @type.nil? ? '' : @type
  }
end

Private Instance Methods

type(text) click to toggle source
# File lib/swagger_docs_generator/parser/actions/parameters/path.rb, line 22
def type(text)
  @type = text
end