I have the following class that represents a response:
class SomeResponse {
property1?: string;
[key: string]: string
}
I want to use the nest-cli to generate the correct swagger documentation for this response.
It works for all my other simpler properties i.e. property1 shows correctly in the swagger.
I also tried annotating directly with:
class SomeResponse {
property1?: string;
@ApiProperty()
[key: string]: string
}
but this is not allowed, as this gives: error TS1206: Decorators are not valid here.
Is there a way to annotate manually or with the nest-cli constructions like [key: string]: string?