While using the response object interface, I set up a specific API to only return a null value for that property, and while documenting it, I ran into a problem: Circular dependency error when using @ApiProperty({type: null}).
export class ModifyPasswordRes implements Res<null> {
@ApiProperty({ type: null }) // Error occurs even without 'type: null'
data: null;
@ApiProperty()
statusCode: number;
@ApiProperty()
statusMsg: string;
}
/**
* Error: A circular dependency has been detected (property key: "data"). Please, make sure that each side of a bidirectional relationships are using lazy resolvers ("type: () => ClassType").
*/
I'd like to indicate in the Swagger documentation that the response property data for this API unconditionally returns null, is there any way to do that?