class Swagger::V2::Path

Class representing a Swagger “Path Item Object”. @see github.com/wordnik/swagger-spec/blob/master/versions/2.0.md#pathItemObject Path Item Object

Constants

VERBS

Public Instance Methods

each_parameter() { |parameter| ... } click to toggle source

Iterates over each Path level parameter.

# File lib/swagger/v2/path.rb, line 34
def each_parameter
  return if parameters.nil?
  parameters.each do |parameter|
    yield parameter
  end
end
operations() click to toggle source
# File lib/swagger/v2/path.rb, line 18
def operations
  VERBS.each_with_object({}) do |v, h|
    operation = send v
    h[v] = operation if operation
  end
end
path() click to toggle source
# File lib/swagger/v2/path.rb, line 29
def path
  parent.paths.key self
end
uri_template() click to toggle source
# File lib/swagger/v2/path.rb, line 25
def uri_template
  "#{parent.host}#{parent.base_path}#{path}"
end