我们正在使用 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>
第一个集合在发音页面上被正确解析和输出,但是其中各个元素的所有注释都完全丢失了。奇怪的是,这只发生在元素序列中,但枚举工作得很好。
我尝试了几种不同的格式化文档的方法,包括使用 CDATA 块,但似乎没有任何效果。
我错过了什么?如果需要,我可以包含更多的 XSD。