Skip to content

Support nullable as type arrays for OpenAPI 3.1 #898

Closed
@timomeh

Description

@timomeh

In OpenAPI v3.1 nullable: true was removed in favor of type arrays with the value "null". Reference: https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0

# OpenAPI v3.0
type: string
nullable: true

# OpenAPI v3.1
type:
- "string"
- "null" 

The current version of openapi-typescript generates those properties as unknown, instead of string | null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PRs welcomePRs are welcome to solve this issue!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions