Issue #2449 SubClass annotations are missing from the base class (#4085)

* petstore up to latest

* Issue #2449 SubClass annotations are missing from the base class

* include child in all its super types
This commit is contained in:
szakrewsky
2016-11-21 04:03:26 -05:00
committed by wing328
parent 1968bead43
commit 76965594b9
10 changed files with 81 additions and 5 deletions

View File

@@ -16,13 +16,18 @@ package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Animal
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className" )
@JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
})
public class Animal {
@JsonProperty("className")
private String className = null;