springfox: Parent inheritance not working in @ApiModel

@ApiModel(discriminator = "type", subTypes = {Cat.class, Dog.class})
public class Animal {
}

@ApiModel(parent = Animal.class)
public class Cat extends Animal {
}

@ApiModel(parent = Animal.class)
public class Dog extends Animal {
}

But in generated json I don’t see any “discriminator”

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (4 by maintainers)

Most upvoted comments

@dilipkrish at the moment a lot of people uses TypeScript which has class hierarchy. Also in new versions of JavaScript you can create class hierarchy https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes

This will not be supported going forward as we move to Open API 3.0 support @raderio. The annotations will no longer work with 3.0 swagger annotations (packages changed). Also, It was part of a bulk closing of open question issues.

Why this was closed?

+1. I really need this.