code: def _register(self, target, endpoint=None, blueprint=None,
                    resource_class_args=None, resource_class_kwargs=None):
          
          if isinstance(target, types.FunctionType):
              paths = self.view_converter.convert(target, endpoint, blueprint)
          elif isinstance(target, ResourceMeta):
              paths = self.resource_converter.convert(
                  target,
                  endpoint,
                  blueprint,
                  resource_class_args=resource_class_args,
                  resource_class_kwargs=resource_class_kwargs,
              )
          else:
              raise TypeError()
          for path in paths:
              self.spec.path(**path)
docs: Register a view.
  
          :param target: view function or view class.
          :param endpoint: (optional) endpoint name.
          :param blueprint: (optional) blueprint name.
          :param tuple resource_class_args: (optional) args to be forwarded to the
              view class constructor.
          :param dict resource_class_kwargs: (optional) kwargs to be forwarded to
              the view class constructor.