title: swagger generated Nodejs : Error: request entity too large
body: <p>Generated Nodejs code using editor.swagger and in body I want to send 10mb but unable to send, I'm getting this error:</p>
  
  <pre><code>Error: request entity too large
      at makeError (c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\node_modules\body-parser\node_modules\raw-body\index.js:154:15)
      at readStream (c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\node_modules\body-parser\node_modules\raw-body\index.js:188:15)
      at getRawBody (c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\node_modules\body-parser\node_modules\raw-body\index.js:95:12)
      at read (c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\node_modules\body-parser\lib\read.js:64:3)
      at jsonParser (c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\node_modules\body-parser\lib\types\json.js:116:5)
      at c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\middleware\swagger-metadata.js:72:9
      at urlencodedParser (c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\node_modules\body-parser\lib\types\urlencoded.js:91:37)
      at bodyParser (c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\middleware\swagger-metadata.js:68:5)
      at c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\middleware\swagger-metadata.js:258:5
      at c:\apigee\dojo\nodeServer_2\node\node_modules\swagger-tools\node_modules\async\lib\async.js:356:13
  </code></pre>
  
  <p>I already tried this option but still same error. Here is a sample code from index.js:</p>
  
  <pre><code>swaggerTools.initializeMiddleware(swaggerDoc, function (middleware) {
    // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain
       app.use(middleware.swaggerMetadata());
    /*app.use(middleware.swaggerMetadata(
        bodyParser.json({limit: "50mb"}),
        bodyParser.urlencoded({ limit: "50mb", extended: true })
    )
    );*/
  
    // Validate Swagger requests
    app.use(middleware.swaggerValidator());
  
    // Route validated requests to appropriate controller
    app.use(middleware.swaggerRouter(options));
  
    // Serve the Swagger documents and Swagger UI
    app.use(middleware.swaggerUi());
  
    //app.use(bodyParser.json({limit: "50mb"}));
    //app.use(bodyParser.urlencoded({ limit: "50mb", extended: true }));
  
    app.use(bodyParser.json({limit: 10 * 1024 * 1024}));
    app.use(bodyParser.raw({limit: 10 * 1024 * 1024}));
    app.use(bodyParser.text({limit: 10 * 1024 * 1024}));
    app.use(bodyParser.urlencoded({limit: 10 * 1024 * 1024, extended: true}));
  </code></pre>