Class: Openapi3Parser::NodeFactory::Responses

Inherits:
Map
  • Object
show all
Defined in:
lib/openapi3_parser/node_factory/responses.rb

Constant Summary collapse

KEY_REGEX =
/
  \A
  (
  default
  |
  [1-5]([0-9][0-9]|XX)
  )
  \Z
/x.freeze

Instance Attribute Summary

Attributes inherited from Map

#allow_extensions, #context, #data, #default, #validation, #value_factory, #value_input_type

Instance Method Summary collapse

Methods inherited from Map

#errors, #inspect, #nil_input?, #node, #raw_input, #resolved_input, #valid?

Constructor Details

#initialize(context) ⇒ Responses

Returns a new instance of Responses.


18
19
20
21
22
23
24
25
# File 'lib/openapi3_parser/node_factory/responses.rb', line 18

def initialize(context)
  factory = NodeFactory::OptionalReference.new(NodeFactory::Response)

  super(context,
        allow_extensions: true,
        value_factory: factory,
        validate: :validate_keys)
end