5

I am using swagger-codegen to generate JAVA class.

I want to generate a class with ResponseEntity with ResponseEntity<InputStreamResource> .

For example:

ResponseEntity<InputStreamResource> pmml(@RequestParam(value = "modelUuid") String modelUuid);

I use the below yaml to generate JAVA class.

paths:
  /report:
    get:
      summary: Returns the report in the PDF format
      responses:
        '200':
          description: A PDF file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary

but it only generate the java class as below:

ResponseEntity<File> report();
egg
  • 211
  • 1
  • 2
  • 10

0 Answers0