Sha256: 8e5c802de5ebc7dcd2ba949e20fce79ab699d000f3b3220156a2d048393aa001

Contents?: true

Size: 651 Bytes

Versions: 4

Compression:

Stored size: 651 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#requestBodyObject
    class RequestBody < Node::Object
      # @return [String, nil]
      def description
        node_data["description"]
      end

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

      # @return [Map<String, MediaType>]
      def content
        node_data["content"]
      end

      # @return [Boolean]
      def required?
        node_data["required"]
      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/request_body.rb
openapi3_parser-0.5.1 lib/openapi3_parser/node/request_body.rb
openapi3_parser-0.5.0 lib/openapi3_parser/node/request_body.rb
openapi3_parser-0.4.0 lib/openapi3_parser/node/request_body.rb