lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.32k stars 481 forks source link

nullable: true and allOf #1627

Closed huomaozi closed 2 weeks ago

huomaozi commented 1 month ago

when I define the interface with the field {field1: T | null} the swagger output will contains both nullable and allOf, like below:

NullableOptionCalendar: allOf:

  • $ref: "#/components/schemas/Calendar" nullable: true

may I know does it possible to remove the allOf? because only 1 type here, seems allOf is useless.

Sorting

Expected Behavior

is it possible to

NullableOptionCalendar: $ref: "#/components/schemas/Calendar" nullable: true

Current Behavior

Possible Solution

Steps to Reproduce

      1. 4.

Context (Environment)

Version of the library: Version of NodeJS:

Detailed Description

Breaking change?

github-actions[bot] commented 1 month ago

Hello there huomaozi 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days