Skip to content

[qt] Binary format doesn't compile #3421

@MartinDelille

Description

@MartinDelille
Description

I tried to describe a binary format file download as describe here: https://swagger.io/docs/specification/describing-responses/

Unfortunately, the generated code doesn't compile.

openapi-generator version

4.0.3

OpenAPI declaration file content or url
openapi: 3.0.1
servers:
  - url: 'https://api.myapp.com/v1'
info:
  description: This is myapp.com API.
  version: 1.0.0
  title: myapp.com
paths:
  /picture/{pictureId}:
    get:
      operationId: findPictureById
      parameters:
        - name: pictureId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: A picture file
          content:
            image/png:
              schema:
                type: string
                format: binary
Command line used for generation
openapi-generator generate -i api.yaml -g cpp-qt5-client
Steps to reproduce

Generate the upper spec with the given command and try to compile.

Related issues/PRs

No

Suggest a fix/enhancement

I'll be happy to help to fix this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions