Sha256: 984294174db8bfe5f15b911760564ae1fad6bf19cf3d3f1800b513c72e0926ee

Contents?: true

Size: 725 Bytes

Versions: 4

Compression:

Stored size: 725 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#exampleObject
    class Example < Node::Object
      # @return [String, nil]
      def summary
        node_data["summary"]
      end

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

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

      # @return [Object]
      def value
        node_data["value"]
      end

      # @return [String, nil]
      def external_value
        node_data["externalValue"]
      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/example.rb
openapi3_parser-0.5.1 lib/openapi3_parser/node/example.rb
openapi3_parser-0.5.0 lib/openapi3_parser/node/example.rb
openapi3_parser-0.4.0 lib/openapi3_parser/node/example.rb