我们使用的是maven-enunciate plugin版本1.26.2,在生成文档的过程中遇到了一个问题。我们通过以下方式向XSD添加了注释:
<xs:complexType name="PagingParameters">
<xs:annotation>
<xs:documentation>information about PagingParameters</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element name="StartPos" type="xs:long" nillable="false">
<xs:annotation>
<xs:documentation>information about StartPos</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FollowOnBrowseToken" type="xs:string" nillable="false">
<xs:annotation>
<xs:documentation>information about token</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element name="NoOfRecords" type="xs:long" nillable="false">
<xs:annotation>
<xs:documentation>information about noOfRecords</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>第一个集合被正确解析并输出到阐述页面,但是其中各个元素的所有注释都完全丢失了。奇怪的是,这只发生在元素序列中,但枚举工作得很好。
我遗漏了什么?如果需要,我可以包含更多的XSD。
发布于 2013-07-07 04:22:50
Enunciate使用JavaDoc来解析它的文档。您能确认JavaDoc出现在生成的Java类中吗?
发布于 2013-10-07 21:12:36
Javadoc不会出现在生成的类中,但随后jaxb会用自己的标准注释覆盖它,如下所示:
/**
* Gets the value of the X property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getX() {但是仍然没有在enuciate中显示javadoc。
https://stackoverflow.com/questions/15300947
复制相似问题