completecoding / serverless-auto-swagger

80 stars 48 forks source link

Is there a way to return responseData->bodyType as array of objects #87

Closed tihobanov closed 2 years ago

tihobanov commented 2 years ago

I am trying to return a response as an array of objects, but there is no way to do it.

Desired body type
[ {},{},{} ]

I have tried 

export interface MyTest {
  id: string;
}

export interface Response extends Array<MyTest>{}

Can you advise, please?

bfaulk96 commented 2 years ago

You can do

export interface MyTest {
  id: string;
}

export type Response = MyTest[];