@JsonIgnore is not working in the Swagger JSON generation when using jaxrs-analyzer

荒凉一梦 提交于 2019-12-25 11:26:11

问题


I'm using jaxrs-analyzer to generate Swagger JSON docs. In my POJO classes I have added @JsonIgnore annotation to skip them in the JSON doc, but I still see that portion in my swagger JSON doc, which then causes the following issue when loading Swagger UI:

swagger.js:744 Uncaught TypeError: Cannot read property '$ref' of undefined`

@JsonIgnore
public Set<HistoryTankSystem> getHistoryStatusSet() {
    return historyStatusSet;
}

"historyStatusSet" : {
    "type": "array",
    "items": {
        "$ref": "HistoryTankSystem"
    },
    "uniqueItems": true
}

来源:https://stackoverflow.com/questions/37339941/jsonignore-is-not-working-in-the-swagger-json-generation-when-using-jaxrs-analy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!