Module: Scorpio::OpenAPI::Tag

Included in:
V2::Tag, V3::Tag
Defined in:
lib/scorpio/openapi/tag.rb

Instance Method Summary collapse

Instance Method Details

#operationsEnumerable<Scorpio::OpenAPI::Operation>

operations in the openapi document which have a tag with this tag's name

Returns:



6
7
8
9
10
11
12
# File 'lib/scorpio/openapi/tag.rb', line 6

def operations
  unless jsi_root_node.is_a?(OpenAPI::Document)
    raise("Tag#operations cannot be used on a Tag that is not inside an OpenAPI document")
  end

  jsi_root_node.operations.select { |op| op.tags.respond_to?(:to_ary) && op.tags.include?(name) }
end