Sha256: 8c5af6961f11850a075ab232a80fb0126faf082094bbf864ba0381c1ac11b01c
Contents?: true
Size: 842 Bytes
Versions: 12
Compression:
Stored size: 842 Bytes
Contents
# frozen_string_literal: true require "openapi3_parser/node_factory/object" module Openapi3Parser module NodeFactory class Encoding < NodeFactory::Object allow_extensions field "contentType", input_type: String field "headers", factory: :headers_factory field "style", input_type: String field "explode", input_type: :boolean, default: :default_explode field "allowReserved", input_type: :boolean, default: false private def build_object(data, context) Node::Encoding.new(data, context) end def headers_factory(context) factory = NodeFactory::OptionalReference.new(NodeFactory::Header) NodeFactory::Map.new(context, value_factory: factory) end def default_explode context.input["style"] == "form" end end end end
Version data entries
12 entries across 12 versions & 2 rubygems