Skip to content

[rust client] Client does not generate enums. Bug: oneOf schemas are not correct #1369

@ghost

Description

Description

Enums are not been generated (there is a TODO though).
The oneOf schemas are not generated correctly. See my pr where I changed the generated code so that it could compile.

openapi-generator version

version 3.3.2 and 4.0.0

OpenAPI declaration file content or url

This is the schema used. See below what caused the bug.

        200:
          description: Ticker/s for the last 24hr
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ticker24hr'
                  - $ref: '#/components/schemas/ticker24hrlist'
Command line used for generation

'java -jar openapi-generator-cli-3.3.2.jar generate -i binance.yml -o test/ -g rust'

Suggest a fix/enhancement

I am new to rust and are still learning so are a bit unsure if the enums changes are correct if someone can confirm, Ill do a pr to add the enums.

The oneOf bug though, I am not sure how to fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions