问题
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