scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.42k stars 225 forks source link

The swagger-ui is stuck / very slow in a post request with a huge object response #247

Closed shrsbg closed 2 years ago

shrsbg commented 3 years ago

Hi, I'm using "swagger-ui-express": "4.1.4" and when I send as a response a big object, the UI is stuck or very very slow. When I use postman, for example, I get the response very fast.

Can someone help please?

ah-kevin commented 3 years ago

the same

rix-nohup commented 3 years ago

the same problem, but i'm using "swagger-ui-express": "4.1.5"

rix-nohup commented 3 years ago

this works for me

into file node_modules/swagger-ui-express/index.js

at row: 104

change swaggerOptions

var swaggerOptions = { syntaxHighlight: { activated: false, theme: "agate" },

ah-kevin commented 3 years ago

i build swagger ui dist , length>20000 syntaxHighlight activated is false.

shrsbg commented 3 years ago

this works for me

into file node_modules/swagger-ui-express/index.js

at row: 104

change swaggerOptions

var swaggerOptions = { syntaxHighlight: { activated: false, theme: "agate" },

Thanks but I can't run the service after that unfortunately

shrsbg commented 3 years ago

i build swagger ui dist , length>20000 syntaxHighlight activated is false.

@ah-kevin I didn't get you, sorry

jmroon commented 3 years ago

Same issue here. An 888kB response with 602 rows (mongodb) returns in around 200ms but takes 1-2 minutes to render.

scottie1984 commented 2 years ago

Suggest raising with swagger ui https://github.com/swagger-api/swagger-ui directly