Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unknown type: TupleType #685

Closed
2 of 4 tasks
williamdes opened this issue May 7, 2020 · 5 comments
Closed
2 of 4 tasks

Error: Unknown type: TupleType #685

williamdes opened this issue May 7, 2020 · 5 comments
Labels

Comments

@williamdes
Copy link

williamdes commented May 7, 2020

Sorting

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • I confirm that I

    • 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] 😆

Detailed Description

This interface is not detected correctly.

@williamdes
Copy link
Author

Error: Unknown type: TupleType is also triggered by

categories: [
        {
            catName: string;
        }
    ];

@WoH
Copy link
Collaborator

WoH commented May 7, 2020

We can't type tuples in OpenAPI yet, so this is intended.
See #242

@williamdes
Copy link
Author

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

@WoH
Copy link
Collaborator

WoH commented May 7, 2020

Sure, feel free to submit a PR!

@github-actions
Copy link

github-actions bot commented Jun 7, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants