class SwaggerParser::Path
Constants
- OPERATION_NAMES
Public Instance Methods
delete()
click to toggle source
@return [SwaggerParser::Operation, nil]
# File lib/swagger_parser/path.rb, line 22 def delete if source["delete"] SwaggerParser::Operation.new(source["delete"], http_method: "DELETE") end end
get()
click to toggle source
@return [SwaggerParser::Operation, nil]
# File lib/swagger_parser/path.rb, line 29 def get if source["get"] SwaggerParser::Operation.new(source["get"], http_method: "GET") end end
head()
click to toggle source
@return [SwaggerParser::Operation, nil]
# File lib/swagger_parser/path.rb, line 36 def head if source["head"] SwaggerParser::Operation.new(source["head"], http_method: "HEAD") end end
operations()
click to toggle source
@return [Array<SwaggerParser::Operation>]
# File lib/swagger_parser/path.rb, line 43 def operations OPERATION_NAMES.map do |operation_name| send(operation_name) end.compact end
options()
click to toggle source
@return [SwaggerParser::Operation, nil]
# File lib/swagger_parser/path.rb, line 50 def options if source["options"] SwaggerParser::Operation.new(source["options"], http_method: "OPTIONS") end end
parameters()
click to toggle source
@return [Object]
# File lib/swagger_parser/path.rb, line 57 def parameters source["parameters"] end
patch()
click to toggle source
@return [SwaggerParser::Operation, nil]
# File lib/swagger_parser/path.rb, line 62 def patch if source["patch"] SwaggerParser::Operation.new(source["patch"], http_method: "PATCH") end end
post()
click to toggle source
@return [SwaggerParser::Operation, nil]
# File lib/swagger_parser/path.rb, line 69 def post if source["post"] SwaggerParser::Operation.new(source["post"], http_method: "POST") end end
put()
click to toggle source
@return [SwaggerParser::Operation, nil]
# File lib/swagger_parser/path.rb, line 76 def put if source["put"] SwaggerParser::Operation.new(source["put"], http_method: "PUT") end end