Sha256: b90f02ff34920ad4dbcc94f13f37d1ad8a73043749c25a7dc381b18d61fe2b80

Contents?: true

Size: 1.33 KB

Versions: 11

Compression:

Stored size: 1.33 KB

Contents

# frozen_string_literal: true

module Openapi3Parser
  module Node
    # This contains methods that are shared between nodes that act like a
    # Parameter, at the time of writing this was {Header}[../Header.html]
    # and {Parameter}[../Paramater.html]
    module ParameterLike
      # @return [String]
      def description
        self["description"]
      end

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

      # @return [Boolean]
      def required?
        self["required"]
      end

      # @return [Boolean]
      def deprecated?
        self["deprecated"]
      end

      # @return [Boolean]
      def allow_empty_value?
        self["allowEmptyValue"]
      end

      # @return [String, nil]
      def style
        self["style"]
      end

      # @return [Boolean]
      def explode?
        self["explode"]
      end

      # @return [Boolean]
      def allow_reserved?
        self["allowReserved"]
      end

      # @return [Schema, nil]
      def schema
        self["schema"]
      end

      # @return [Any]
      def example
        self["example"]
      end

      # @return [Map<String, Example>, nil]
      def examples
        self["examples"]
      end

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

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
openapi3_parser-0.10.1 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.9.2 lib/openapi3_parser/node/parameter_like.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/openapi3_parser-0.9.1/lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.9.1 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.9.0 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.8.2 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.8.1 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.8.0 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.7.0 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.6.1 lib/openapi3_parser/node/parameter_like.rb
openapi3_parser-0.6.0 lib/openapi3_parser/node/parameter_like.rb