liubao68 edited a comment on issue #2569: URL: https://github.com/apache/servicecomb-java-chassis/issues/2569#issuecomment-917752603
1. java-chassis 2.x 无法升级到到 swagger 2.x, 因为2.x支持的open api是不同版本, 不兼容。 这个规划是在 java-chassis 3.x 进行升级。 2. java-chassis无法降低swagger版本, 一般来讲,只能升版本,无法降版本。 因为老版本的安全等问题无法追溯。 1.3.0使用的是1.5.22版本, 你可以通过[maven dependency manage ](https://servicecomb.apache.org/cn/docs/maven_dependency_management/) 使用这个版本临时规避, 尽管不建议这么做。 另外, 我发现你提供的代码可能有点问题: ``` private List controlItems; @XmlElementWrapper(name="controlItems") @XmlElement(name = "controlItem") public List<ControlItem> getControlItems() { return controlItems; } public void setControlItems(List<ControlItem> controlItems) { this.controlItems = controlItems; } ``` java-chassis使用泛型,必须制定具体类型。 ``` private List<ControlItem> controlItems; // 必须制定具体类型 @XmlElementWrapper(name="controlItems") @XmlElement(name = "controlItem") public List<ControlItem> getControlItems() { return controlItems; } public void setControlItems(List<ControlItem> controlItems) { this.controlItems = controlItems; } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
