You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd version v1.4.0 installed earlier and it was working fine until today when I upgraded it to the latest i.e. v1.4.1. On loading the swagger doc page I'm getting this error.
Package version
1.4.1
Node.js and npm version
Node: v16.16.0 & npm: 8.16.0
Sample Code (to reproduce the issue)
I'd version v1.4.0 installed earlier and it was working fine until today when I upgraded it to the latest i.e. v1.4.1. On loading the swagger doc page I'm getting this error.
Endpoint:
http://localhost:3333/docs/index.html
I debugged the code and noticed that in
v1.4.1
we are sending the html file i.e.index.html
as stream.adonis5-swagger/src/SwaggerController.ts
Line 45 in b72485a
While, in
v1.4.0
we read the html file and then send it in response.adonis5-swagger/src/SwaggerController.ts
Lines 32 to 40 in 5b88d08
I could confirm that reading the file first using
fs.readFileSync
and then sending it in response viaresponse.send(file)
fixes the issue.The text was updated successfully, but these errors were encountered: