Skip to content

enum + nullable: true doesn't compute the good type #145

Closed
@RoXuS

Description

@RoXuS

Hey,

In case of enum + nullable: true, we get an union types without null type.

Example:

{
  "openapi": "3.0.1",
...
  "MyDto": {
        "type": "object",
        "properties": {
          "id":  {
            "type": "integer",
            "format": "int64"
          },
          "legalCategory": {
            "type": "string",
            "nullable": true,
            "enum": [
              "SARL",
              "ASSOCIATION"
             ]
           }
      }
export interface MytDto {
  id: number;
  legalCategory:
    | "SARL"
    | "ASSOCIATION";
...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions