java - Swagger 2.0 + Jackson: @JsonIdentityInfo doesn't work -
we attempting have swagger 2.0. basically, it's great except ignoring @jsonidentityinfo , @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 , setters }
resulting in swagger schema output:
{ "id": 0, "sourcedefinitionname": { "configuration": {}, "driver": "string", "id": "string", "name": "string", "sourcetype": "query", "title": "string" } }
you can see indeed reads @jsonproperty annotation renaming "sourcedefinition" "sourcedefinitionname" value should string.
does have insight sort of problem integration?
Comments
Post a Comment