Martin さん、wadl ドキュメント生成コードを使用して Javadoc アノテーションから REST インターフェイスをドキュメント化しようとしましたが、メソッド / クエリ パラメータへのパラメータをドキュメント化することができませんでした。何が間違っているのかよくわかりません。通常の方法でメソッドに Javadoc コメントを指定します。次に例を示します。
/**
* 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 で Account オブジェクトを取得する」というコメントは、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 ファイルには何も表示されません。あなたが与えることができるどんな助けも大歓迎です。