title: flask_restplus add_namespace keep getting no attribute 'as_view'
body: <p>I writing a flask, trying to organize it by using Blueprint with Namespace, following this <a href="http://flask-restplus.readthedocs.io/en/stable/scaling.html" rel="nofollow noreferrer">tutorial</a></p>
  
  <p>I had faced some problem, and had look around internet and had review solution in <a href="https://stackoverflow.com/questions/21547073/flask-restful-error-as-view-method-not-inherited">1</a> and <a href="https://stackoverflow.com/questions/31570096/move-flask-restplus-swagger-api-docs">2</a>. The first one is not relevant to what I doing, and the second one the solution just doesn't fix my problem. </p>
  
  <p>Here are my code: </p>
  
  <p><strong>project/project.py</strong></p>
  
  <pre><code>from flask import Flask, jsonify, url_for
  from .apis.apis import api
  
  app = Flask(__name__)
  
  app.register_blueprint(api, url_prefix="/api")
  </code></pre>
  
  <p><strong>project/apis/apis.py</strong></p>
  
  <pre><code>from flask import Blueprint
  from .user.authentication import auth
  from flask_restplus import Api, apidoc, Resource
  
  blueprint = Blueprint("api", __name__)
  
  api = Api(blueprint, doc='/docs', ui=False)
  
  api.add_namespace(auth, path="/auth") #Keep getting error at this line
  </code></pre>
  
  <p><strong>project/apis/user/authentication.py</strong></p>
  
  <pre><code>from flask_restplus import Namespace
  
  auth = Namespace('auth', description='Authentication')
  
  @auth.route("/test")
  def authentication():
      return "test"
  </code></pre>
  
  <p><strong>Stack Trace</strong></p>
  
  <pre><code>    Traceback (most recent call last):
          File "/home/gaara/Python/Flask-Api/project/__init__.py", line 1, in &lt;module&gt;
              from .project import app
          File "/home/gaara/Python/Flask-Api/project/project.py", line 3, in &lt;module&gt;
              from .apis.apis import api
          File "/home/gaara/Python/Flask-Api/project/apis/apis.py", line 13, in &lt;module&gt;
              api.add_namespace(auth, path="/auth")
          File "/home/gaara/Python/Flask-Api/venv/lib/python3.6/site-packages/flask_restplus/api.py", line 413, in add_namespace
              self.register_resource(ns, resource, *self.ns_urls(ns, urls), **kwargs)
          File "/home/gaara/Python/Flask-Api/venv/lib/python3.6/site-packages/flask_restplus/api.py", line 255, in register_resource
              self._register_view(self.app, resource, *urls, **kwargs)
          File "/home/gaara/Python/Flask-Api/venv/lib/python3.6/site-packages/flask_restplus/api.py", line 276, in _register_view
              resource_func = self.output(resource.as_view(endpoint, self, *resource_class_args,
      AttributeError: 'function' object has no attribute 'as_view'
  </code></pre>
  
  <p>I am not sure why I keep getting this error, had try few approach, include put apis.py all in __init__.py and change the import, but always getting the same error. </p>
  
  <p>What I wish is to code api in an organize way, and when go to <code>localhost:5000/api/auth/test</code> it will output me <code>test</code></p>