title: flask_restplus is not generating the proper Swagger UI
body: <p>Ok I have a project in the following structure in PyCharm:</p>
  
  <p><a href="https://i.stack.imgur.com/Sscq3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sscq3.png" alt="enter image description here"></a></p>
  
  <p>The contents of <code>test_ns.py</code> is as follows:</p>
  
  <pre><code>from flask_restplus import Api
  from flask_restplus import Resource
  from flask_restplus import reqparse
  
  api = Api(version='1.0', title='My Blog API',
            description='A simple demonstration of a Flask RestPlus powered API')
  
  ns = api.namespace('blog/posts', description='Operations related to blog posts')
  
  parser = reqparse.RequestParser()
  parser.add_argument('Hello', required=True, location='form')
  
  
  @ns.route('/')
  class PostsCollection(Resource):
  
      @api.expect(parser)
      def get(self):
          """
          Returns list of blog posts.
          """
  
          return "Hello World from Swagger"
  </code></pre>
  
  <p>The content of <code>server.py</code> is as follows:</p>
  
  <pre><code>from web.test_ns import ns, api
  from flask import Flask, Blueprint
  
  app = Flask(__name__)
  
  
  def configure_app(flask_app):
      flask_app.config['SWAGGER_UI_DOC_EXPANSION'] = 'List'
      flask_app.config['RESTPLUS_VALIDATE'] = True
      flask_app.config['RESTPLUS_MASK_SWAGGER'] = False
  
  
  def initialize_app(flask_app):
      configure_app(flask_app)
  
      blueprint = Blueprint('api', __name__, url_prefix='/api')
  
      api.init_app(blueprint)
      api.add_namespace(ns)
  
      flask_app.register_blueprint(blueprint)
  
  
  def main():
      initialize_app(app)
      app.run(host="127.0.0.1", port="5000")
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>The problem is that I am not getting the appropriate Swagger UI. When I run server.py and access it in my browser this is what I get:</p>
  
  <p><a href="https://i.stack.imgur.com/vDECT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vDECT.png" alt="enter image description here"></a></p>
  
  <p>Its basically not the actual Swagger-UI that I want. </p>
  
  <p>What I want is what is advertised on the <a href="https://flask-restplus.readthedocs.io/en/stable/swagger.html#swagger-ui" rel="nofollow noreferrer">flask_restplus site</a>:</p>
  
  <p><a href="https://i.stack.imgur.com/AgiNz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AgiNz.png" alt="enter image description here"></a></p>
  
  <p>I just cannot understand what I am doing wrong.</p>
  
  <p>I have gone through a project on GitHub <a href="https://github.com/postrational/rest_api_demo" rel="nofollow noreferrer">over here</a> but I can't understand what I am doing differently or incorrectly. The project uses the same packages for Swagger as me yet I am unable to get the correct output. Where am I going wrong? </p>
  
  <p>The instructions to run the GitHub project can be found <a href="http://michal.karzynski.pl/blog/2016/06/19/building-beautiful-restful-apis-using-flask-swagger-ui-flask-restplus/" rel="nofollow noreferrer">here</a>.</p>
  
  <p>The only difference between my project and the GitHub one is the later is just using more modules.</p>
  
  <p>Looking at the server log of Flask I can see that the GitHub project is making a lot more calls to the backend to generate the UI:</p>
  
  <p><a href="https://i.stack.imgur.com/bloSx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bloSx.png" alt="enter image description here"></a></p>
  
  <p>While for me I only make a small number of calls to generate my incorrect Swagger UI:</p>
  
  <pre><code>* Serving Flask app "server" (lazy loading)
   * Environment: production
     WARNING: Do not use the development server in a production environment.
     Use a production WSGI server instead.
   * Debug mode: off
   * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  127.0.0.1 - - [08/Feb/2019 23:37:00] "GET / HTTP/1.1" 404 -
  127.0.0.1 - - [08/Feb/2019 23:37:04] "GET /api/ HTTP/1.1" 200 -
  127.0.0.1 - - [08/Feb/2019 23:37:04] "GET /swaggerui/favicon-16x16.png HTTP/1.1" 200 -
  127.0.0.1 - - [08/Feb/2019 23:37:04] "GET /api/swagger.json HTTP/1.1" 200 -
  </code></pre>
  
  <p><strong>What is the reason for the difference?</strong> </p>
  
  <p>I have searched the docs, but I can't find anything. What am I missing?</p>
  
  <p>Even using an example from the <a href="https://flask-restplus.readthedocs.io/en/stable/swagger.html#swagger-ui" rel="nofollow noreferrer">flask_restplus site</a> fails to give the correct Swagger UI, as advertised.</p>
  
  <p><strong>What is so magical about the GitHub project why is it the only project that works? What is it doing correctly, that I clearly am not.</strong></p>