Class: SwaggerDocsGenerator::Actions::Path

Inherits:
Parameter
  • Object
show all
Defined in:
lib/swagger_docs_generator/parser/actions/parameters/path.rb

Overview

Write parameter type :path

Instance Method Summary collapse

Methods inherited from Parameter

#initialize

Constructor Details

This class inherits a constructor from SwaggerDocsGenerator::Actions::Parameter

Instance Method Details

#to_hashObject



10
11
12
13
14
15
16
17
18
# 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