Skip to content

OpenAPI spec contains some default values in optional enum fields #518

@misialq

Description

@misialq

Describe the bug
I have encountered an issue similar to #441: there are still two schema fields where the DEFAULT value is being inserted into the Python client generated using OpeAPI generator. This causes errors when trying to use the client:

ncbi/datasets/openapi/models/v2_assembly_links_reply_assembly_link.py:31: in V2AssemblyLinksReplyAssemblyLink
    assembly_link_type: Optional[V2AssemblyLinksReplyAssemblyLinkType] = DEFAULT
E   NameError: name 'DEFAULT' is not defined

I am not very familiar with the OpenAPI schemas but from what I see in the Python client, those fields are:

  • V2AssemblyLinksReplyAssemblyLinkType
  • V2GeneLinksReplyGeneLinkType

To Reproduce

  • follow the client generation instructions from the documentation (I tried with Python)
  • install the client, e.g.: pip install . pytest
  • run the tests (from the same working directory), e.g.: pytest .

Expected behavior
Tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions