I built a swagger using swagger-ui-express module for my node js backend. I have an endpoint that returns files ( pdf-doc or xlsx). When i test my endpoint on swagger it rturns me 200 response with always this message on body 'Unrecognized response type; displaying content as text.' This is my swagger endpoint's code.
"/reports?typeDoc={typeDoc}&file={file}": {
"get": {
"tags": [
"Generate report"
],
"description": "",
"operationId": "",
"parameters": [
{
"name": "typeDoc",
"in": "path",
"description": "type of document",
"required": true,
"type": "string"
},
{
"name": "file",
"in": "path",
"description": "name of the file",
"required": true,
"type": "string"
}
],
"responses": {
"200":{
"description": "Report generated succefully. ",
"content":{
"application/octet-stream":{
"schema":{
"type": "string",
"format": "binary"}
}
}
},
"500": {
"description": "Error in zip file structure or typeDoc"
}
}
}
}

