docs: def prepare_obj(self, obj, jref):
          """ basic preparation of an object(those in sepc._version_.objects),
          and cache the 'prepared' object.
          """
          if not obj:
              raise Exception('unexpected, passing {0}:{1} to prepare'.format(obj, jref))
  
          s = Scanner(self)
          if self.version == '1.2':
              # upgrade from 1.2 to 2.0
              converter = Upgrade(self.__sep)
              s.scan(root=obj, route=[converter])
              obj = converter.swagger
  
              if not obj:
                  raise Exception('unable to upgrade from 1.2: {0}'.format(jref))
  
              s.scan(root=obj, route=[AssignParent()])
  
          # fix for yaml that treat response code as number
          s.scan(root=obj, route=[YamlFixer()], leaves=[Operation])
          # normalize $ref
          url, jp = utils.jr_split(jref)
          s.scan(root=obj, route=[NormalizeRef(url)])
          # cache this object
          if url not in self.__objs:
              if jp == '#':
                  self.__objs[url] = obj
              else:
                  self.__objs[url] = {jp: obj}
          else:
              if not isinstance(self.__objs[url], dict):
                  raise Exception('it should be able to resolve with BaseObj')
              self.__objs[url].update({jp: obj})
  
          # pre resolve Schema Object
          # note: make sure this object is cached before using 'Resolve' scanner
          s.scan(root=obj, route=[Resolve()])
          return obj