Skip to content

Support inline allOf enum #422

@skpn

Description

@skpn

Describe the bug
In my openapi.json, a parameter for one of my schemas has a string enum as its type, and a member of that enum as its default value.
In the generated client it has type Union[Unset, None] and default value UNSET.

To Reproduce
Steps to reproduce the behavior:

  1. generate a client based on 'http://sandbox.platform.recital.ai:8000/api/v1/openapi.json'

Expected behavior
In the generated client, the schema's parameter should have type Union[Unset, MyEnum] and default value MyEnum.VALUE like in the openapi.json

OpenAPI Spec File
http://sandbox.platform.recital.ai:8000/api/v1/openapi.json

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.2 LTS (Focal Fossa)
  • Python Version: 3.8.8
  • openapi-python-client version: 0.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions