1

I'm trying to generate a route that passes a file plus some additional parameters to a controller as follows:

myController(
@FormField() name: string,
@FormField() cnpj: string,
@FormField() sector: string,
@FormField() size: string,
@FormField() allowedDomains: string[], <-- Here the problem
@FormField() website?: string,
@UploadedFile() logo?: Express.Multer.File) {}

But one of these parameters is an array of strings (allowedDomains), and instead of being displayed as in the first image, it is generated according to the second.

How its generating

As I expected

I've googled and look in the documentation, but I couldn't understand what's wrong. Directly changing the swagger file by adding an "items" property, works.

  • For now I've switched to sending the information in the body, and then the image is updated in another endpoint. Would be nice to send all the data into a multipart form data, using a single endpoint and then tsoa document correctly =( – Luis Henrique Abeno May 23 '22 at 20:05

0 Answers0