Sha256: f2995e40589d39190b7ace553ec7ca75526d9662c00608f07082402229c26aa0

Contents?: true

Size: 590 Bytes

Versions: 3

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true

require "openapi3_parser/nodes/tag"
require "openapi3_parser/node_factory/object"
require "openapi3_parser/node_factories/external_documentation"

module Openapi3Parser
  module NodeFactories
    class Tag
      include NodeFactory::Object

      allow_extensions
      field "name", input_type: String, required: true
      field "description", input_type: String
      field "externalDocs", factory: NodeFactories::ExternalDocumentation

      private

      def build_object(data, context)
        Nodes::Tag.new(data, context)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openapi3_parser-0.3.0 lib/openapi3_parser/node_factories/tag.rb
openapi3_parser-0.2.0 lib/openapi3_parser/node_factories/tag.rb
openapi3_parser-0.1.0 lib/openapi3_parser/node_factories/tag.rb