File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const http = require('http')
66const config = require ( 'config' )
77
88const app = require ( 'connect' ) ( )
9+ const bodyParser = require ( 'body-parser' )
910const swaggerTools = require ( 'swagger-tools' )
1011const jsyaml = require ( 'js-yaml' )
1112
@@ -26,6 +27,10 @@ const options = {
2627const spec = fs . readFileSync ( path . join ( __dirname , 'api/swagger.yaml' ) , 'utf8' )
2728const swaggerDoc = jsyaml . safeLoad ( spec )
2829
30+ // Extending payload size
31+ app . use ( bodyParser . json ( { limit : '10mb' , extended : true } ) )
32+ app . use ( bodyParser . urlencoded ( { limit : '10mb' , extended : true } ) )
33+
2934// Initialize the Swagger middleware
3035swaggerTools . initializeMiddleware ( swaggerDoc , function ( middleware ) {
3136 // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain
You can’t perform that action at this time.
0 commit comments