0

我们正在使用 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。

4

2 回答 2

0

Enunciate 使用 JavaDoc 来解析其文档。您能否确认 JavaDoc 出现在生成的 Java 类中?

于 2013-07-06T20:22:49.583 回答
0

Javadoc不会出现在生成的类中,但是 jaxb 会用他们自己的标准注释覆盖它,如下所示:

/**
 * Gets the value of the X property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getX() {

但在 enuciate 中仍然没有显示 javadoc

于 2013-10-07T13:12:35.540 回答