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

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -