首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在xs:elements上不能从xs:documentation生成描述

在xs:elements上不能从xs:documentation生成描述
EN

Stack Overflow用户
提问于 2013-03-09 02:35:45
回答 2查看 627关注 0票数 0

我们使用的是maven-enunciate plugin版本1.26.2,在生成文档的过程中遇到了一个问题。我们通过以下方式向XSD添加了注释:

代码语言:javascript
复制
<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。

EN

回答 2

Stack Overflow用户

发布于 2013-07-07 04:22:50

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

票数 0
EN

Stack Overflow用户

发布于 2013-10-07 21:12:36

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

代码语言:javascript
复制
/**
 * Gets the value of the X property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getX() {

但是仍然没有在enuciate中显示javadoc。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15300947

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档