Martin,我一直试图使用您的wadl文档生成代码来记录来自Javadoc注释的REST接口,并且我一直无法获取它来记录参数方法/查询参数。我不太确定我做错了什么。我以通常的方式向该方法提供Javadoc评论,例如:如何获取WADL生成的文档中的参数描述
/**
* Gets an Account object by id.
* @param req the HttpServletRequest encapsulating this GET request
* @param q the id of the Account object to be returned
* @param xid optional transaction id associated with this request
* @return an AccountModel object corresponding to the requested it.
* If not found an APIException is thrown.
*/
@GET @Path("/id")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public AccountModel getAsXML_JSON(@Context final HttpServletRequest req,
@QueryParam("q") String q,
@QueryParam("xid") String xid)
我确定有些事情显而易见,我错过了。如上所述,注释“通过ID获取帐户对象”使其成为resourcedoc.xml文件,并从那里到application.wadl文件,但没有任何参数定义可用。 当我添加
* @annotationDoc {@name q} {@doc the id of the Account object to be returned}
* @annotationDoc {@name xid} {@doc optional transaction id associated with this request}
我可以看到在resourcedoc.xml文件中的参数的描述,但它看起来像他们在错误的地方正在出现,并没有在application.wadl文件显示出来。 你可以给任何帮助将不胜感激。