export class PaginatedResult<T> {
@Expose()
@ApiResponseProperty(type: T}) // It's unfortunate that this isn't working because it's a type but being used as a value
@Transform(({ obj }) =>
obj.data.map((data) => new obj.classConstructor(data)),
)
data: T[];
}
The data is of Type T, which includes options such as Item or Tag and more. However, Swagger only displays Item even on endpoints where the ResponseType is defined as:
{type: PaginatedResult<Tag>}
Is there any workaround for this issue?