Class: Openapi3Parser::Node::Operation

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi3_parser/node/operation.rb

Overview

Instance Attribute Summary

Attributes inherited from Object

#node_context, #node_data

Instance Method Summary collapse

Methods inherited from Object

#==, #[], #each, #extension, #initialize, #inspect, #node_at, #render_markdown, #values

Constructor Details

This class inherits a constructor from Openapi3Parser::Node::Object

Instance Method Details

#alternative_servers?Boolean

Whether this object uses it’s own defined servers instead of falling back to the path items’ ones.

Returns:

  • (Boolean)


78
79
80
# File 'lib/openapi3_parser/node/operation.rb', line 78

def alternative_servers?
  servers != node_context.parent_node.servers
end

#callbacksMap<String, Callback>

Returns:



55
56
57
# File 'lib/openapi3_parser/node/operation.rb', line 55

def callbacks
  self["callbacks"]
end

#deprecated?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/openapi3_parser/node/operation.rb', line 60

def deprecated?
  self["deprecated"]
end

#descriptionString?

Returns:

  • (String, nil)


20
21
22
# File 'lib/openapi3_parser/node/operation.rb', line 20

def description
  self["description"]
end

#description_htmlString?

Returns:

  • (String, nil)


25
26
27
# File 'lib/openapi3_parser/node/operation.rb', line 25

def description_html
  render_markdown(description)
end

#external_docsExternalDocumentation?

Returns:



30
31
32
# File 'lib/openapi3_parser/node/operation.rb', line 30

def external_docs
  self["externalDocs"]
end

#operation_idString?

Returns:

  • (String, nil)


35
36
37
# File 'lib/openapi3_parser/node/operation.rb', line 35

def operation_id
  self["operationId"]
end

#parametersNode::Array<Parameter>

Returns:



40
41
42
# File 'lib/openapi3_parser/node/operation.rb', line 40

def parameters
  self["parameters"]
end

#request_bodyRequestBody?

Returns:



45
46
47
# File 'lib/openapi3_parser/node/operation.rb', line 45

def request_body
  self["requestBody"]
end

#responsesResponses

Returns:



50
51
52
# File 'lib/openapi3_parser/node/operation.rb', line 50

def responses
  self["responses"]
end

#securityNode::Array<SecurityRequirement>



65
66
67
# File 'lib/openapi3_parser/node/operation.rb', line 65

def security
  self["security"]
end

#serversNode::Array<Server>

Returns:



70
71
72
# File 'lib/openapi3_parser/node/operation.rb', line 70

def servers
  self["servers"]
end

#summaryString?

Returns:

  • (String, nil)


15
16
17
# File 'lib/openapi3_parser/node/operation.rb', line 15

def summary
  self["summary"]
end

#tagsNode::Array<String>

Returns:



10
11
12
# File 'lib/openapi3_parser/node/operation.rb', line 10

def tags
  self["tags"]
end