Sha256: a06995e4f3895e019c5cb5261c4b3b8a491e9eab3a0bd79343c9c1b1bc0275f8

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

module Scorpio
  module OpenAPI
    module Tag
      # operations in the openapi document which have a tag with this tag's name
      # @return [Enumerable<Scorpio::OpenAPI::Operation>]
      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
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
scorpio-0.6.4 lib/scorpio/openapi/tag.rb
scorpio-0.6.3 lib/scorpio/openapi/tag.rb
scorpio-0.6.2 lib/scorpio/openapi/tag.rb
scorpio-0.6.1 lib/scorpio/openapi/tag.rb
scorpio-0.6.0 lib/scorpio/openapi/tag.rb