Does version 3.0.0-SNAPSOT supports discriminator and subtypes for DTO`s objects?
See original GitHub issueDoes version 3.0.0-SNAPSOT supports discriminator and subtypes for DTO`s objects? I need smth like that: @ApiModel(value = “ScreenTemplateBase”, discriminator = “pageType”, subTypes = {ScreenTemplateWithTenderButtonsDTO.class, GuestServiceScreenTemplateDTO.class, PackageSaleScreenTemplateDTO.class}) and have ability to choose concrete type of DTO in swagger ui example.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to use the OpenAPI discriminator - Redocly
When an API can return two or more different types of objects (aka polymorphism), use oneOf or anyOf to describe those schemas (a...
Read more >"discriminator" in polymorphism, OpenAPI 2.0 (Swagger 2.0)
According to this google group, discriminator is used on top of the allOf property and it is defined in the super type for...
Read more >2021年04月_weixin_39560207的博客_CSDN博客
在大于2T硬盘上安装系统centos 步骤1、进入第二个控制台(选语言界面)2、按ctrl+alt+f2 进入shell环境中3、运行:/usr/sbin/parted -s /dev/sda mklabel gpt4、 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dilipkrish when you plan to add this support?
Can I ask what the point is of the “subtypes” property in ApiModel if it is not used at all? I have tried to expose subtypes both in 2.9.2 and 3.0.0 but it doesn’t work and nothing gets exposed even though #2407 seems to say it is resolved in 3.0.0. What does work is defining all types in JsonSubTypes, but then “subTypes” is obsolete and could just as well be left off.