Sha256: 072083ec29aef7b862e2689004749373b483cf284c5564294b016a9750a73740

Contents?: true

Size: 895 Bytes

Versions: 4

Compression:

Stored size: 895 Bytes

Contents

# frozen_string_literal: true

require "openapi3_parser/node/object"

module Openapi3Parser
  module Node
    # @see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#infoObject
    class Info < Node::Object
      # @return [String]
      def title
        node_data["title"]
      end

      # @return [String, nil]
      def description
        node_data["description"]
      end

      # @return [String, nil]
      def description_html
        render_markdown(description)
      end

      # @return [String, nil]
      def terms_of_service
        node_data["termsOfService"]
      end

      # @return [Contact, nil]
      def contact
        node_data["contact"]
      end

      # @return [License, nil]
      def license
        node_data["license"]
      end

      # @return [String]
      def version
        node_data["version"]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
openapi3_parser-0.5.2 lib/openapi3_parser/node/info.rb
openapi3_parser-0.5.1 lib/openapi3_parser/node/info.rb
openapi3_parser-0.5.0 lib/openapi3_parser/node/info.rb
openapi3_parser-0.4.0 lib/openapi3_parser/node/info.rb