def create_context(input,
                       document_input: {},
                       document: nil,
                       pointer_segments: [],
                       referenced_by: nil,
                       is_reference: false)
      source_input = Openapi3Parser::SourceInput::Raw.new(document_input)
      document ||= Openapi3Parser::Document.new(source_input)
      location = Openapi3Parser::Context::Location
      document_location = location.new(document.root_source, pointer_segments)
      Openapi3Parser::Context.new(input,
                                  document_location: document_location,
                                  referenced_by: referenced_by,
                                  is_reference: is_reference)
    end
def create_context(input,
                       document_input: {},
                       document: nil,
                       pointer_segments: [],
                       referenced_by: nil,
                       is_reference: false)
      source_input = Openapi3Parser::SourceInput::Raw.new(document_input)
      document ||= Openapi3Parser::Document.new(source_input)
      location = Openapi3Parser::Context::Location
      document_location = location.new(document.root_source, pointer_segments)
      Openapi3Parser::Context.new(input,
                                  document_location: document_location,
                                  referenced_by: referenced_by,
                                  is_reference: is_reference)
    end
rubocop:disable Metrics/ParameterLists