We are attempting to have Swagger 2.0. Basically, it's great except it is ignoring the @JsonIdentityInfo and @JsonIdentityReference annotations.
public class Source {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
@JsonIdentityReference(alwaysAsId=true)
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "name")
@JsonProperty("sourceDefinitionName")
private SourceDefinition sourceDefinition;
... getters and setters
}
Resulting in the Swagger schema output:
{
"id": 0,
"sourceDefinitionName": {
"configuration": {},
"driver": "string",
"id": "string",
"name": "string",
"sourceType": "QUERY",
"title": "string"
}
}
You can see that it indeed reads the @JsonProperty annotation renaming the "sourceDefinition" to "sourceDefinitionName" but the value should just be a string.
Does anyone have any insight into this sort of problem with this integration?