Skip to content

critical error when using nullable enum #7235

@illunix

Description

@illunix

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Windows executable

Client library/SDK language

TypeScript

Describe the bug

So I get critical error when trying to build with this enum in spec

"Currency": {
        "enum": [
          "USD",
          "GBP",
          "EUR",
          null
        ]
      }
 "currency": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Currency"
              }
            ]
          }

Expected behavior

generate client without any problem

How to reproduce

use nullable enum somewhere in code

Open API description file

No response

Kiota Version

1.29.0

Latest Kiota version known to work for scenario above?(Not required)

No response

Known Workarounds

No response

Configuration

No response

Debug output

Click to expand log ```
</details>


### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    TypeScriptPull requests that update Javascript codestatus:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    Status

    Needs Triage 🔍

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions