[ ] Regression
[ ] Bug report
[ X ] Feature request
[ ? ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
I'm not sure if this is a missing feature or just missing documentation, but I'd like to represent a key/value dictionary using ApiModelProperty decorators.
I know this won't work, but this is an example of what I'm trying to achieve...
class SomeStuffDto {
// ...
}
interface MyDict {
@ApiModelProperty({
type: SomeStuffDto,
})
[category: string]: SomeStuffDto;
}
class MyDto {
@ApiModelProperty({
type: MyDict,
})
categorizedStuff: MyDict
}
Is there a way to achieve this type of data structure currently?
Dictionary is not supported in OpenAPI 2.0 so @nestjs/swagger probably won't be able to have this supported for a while. (until we completely move over to OpenAPI 3.0)
@nartc is there any plan to migrate to openapiv3? Dictionary support would be nice
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@nartc is there any plan to migrate to openapiv3? Dictionary support would be nice