question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does version 3.0.0-SNAPSOT supports discriminator and subtypes for DTO`s objects?

See original GitHub issue

Does 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:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
v-semeniukcommented, Aug 5, 2019

@dilipkrish when you plan to add this support?

0reactions
Darkvatercommented, Dec 2, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found