Tsoa: Error: Unknown type: TupleType

Created on 7 May 2020  路  5Comments  路  Source: lukeautry/tsoa

Sorting

  • I'm submitting a ...

    • [x] bug report
    • [ ] feature request
    • [ ] support request
  • I confirm that I

    • [x] used the search to make sure that a similar issue hasn't already been submit

Expected Behavior

No error.

HACK:

TAGS: string[],

Current Behavior

Generate swagger error.
 Error: Unknown type: TupleType
At: company.model.ts:27:27.
This was caused by 'TAGS: [string];'
TAGS: [string],

Steps to Reproduce

Create an interface with:

TAGS: [string],

As a response object.

Context (Environment)

Version of the library: 3.0.8
Version of NodeJS: 10

  • Confirm you were using yarn not npm: [x] :laughing:

Detailed Description

This interface is not detected correctly.

Stale

Most helpful comment

We can't type tuples in OpenAPI yet, so this is intended.
See https://github.com/lukeautry/tsoa/issues/242

All 5 comments

Error: Unknown type: TupleType is also triggered by

categories: [
        {
            catName: string;
        }
    ];

We can't type tuples in OpenAPI yet, so this is intended.
See https://github.com/lukeautry/tsoa/issues/242

Could a link be added to the error so users know it is not an error but a missing feature ?

Sure, feel free to submit a PR!

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rdhelms picture rdhelms  路  4Comments

rustam-crunch picture rustam-crunch  路  5Comments

zarubto4 picture zarubto4  路  6Comments

taicho picture taicho  路  5Comments

fahrradflucht picture fahrradflucht  路  4Comments