有很多优秀的示例和指南(参见参考文献[1])为Java代码编写好的javadoc
我们正在使用Restlet
通过WADL记录我们的REST接口http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/72-restlet.html
引用该教程我们正在添加代码......
@Override
protected void describeDelete(MethodInfo info) {
info.setDocumentation("Delete the current item.");
RepresentationInfo repInfo = new RepresentationInfo();
repInfo.setDocumentation("No representation is returned.");
repInfo.getStatuses().add(Status.SUCCESS_NO_CONTENT);
info.getResponse().getRepresentations().add(repInfo);
}
是否有编码标准或简洁的WADL示例。例如,我们不想复制HTTP动词或URL中隐含的信息。
参考1.如何为Javadoc工具编写Doc注释。 我不能添加URL,因为我是新用户,但我的意思是指南 www.oracle.com/technetwork/java/javase/documentation/index-137868.html
答案 0 :(得分:0)
RESTful系统中唯一需要任何其他文档的部分是自定义媒体类型和自定义链接关系。
可以这样想一下,您为Web浏览器供应商提供了哪些文档,以便用户可以访问您的公司网站?