My application is build on SprinBoot, Java Technology I want write API for file download and I am using swagger-codegen-maven-plugin and in the specification its mentioned as below for file download
content:
application/octect-stream:
schema:
type: string
format: binary
The Code which is auto generated via swagger codegen contains the return type as
ResponseEntity<String>
in java SpringBoot application. Now I have file data in byte[], how to convert it to String and send as application/octect-stream ?.
Also let me know if my data is in File object insteam of byte[] how to send it ?