You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by "Brody, Chris" <ch...@acision.com> on 2009/11/02 12:17:09 UTC

Small Javadoc issue with parameters

Hello,

I hope I am posting this to the right place. We would like to do quick source code documentation and discovered that Thrift does support Javadoc for the Java source code generation (http://publists.facebook.com/pipermail/thrift/2008-June/001058.html). However, if we specify the @param comments, they show up twice in the generated code. For example:

namespace java HelloRpc

/**
 * Hello RPC service
 */
service HelloService {
  /**
   * Hello request
   * @param client_id client id
   */
  void connectRequest(1:string client_id)

}

Java output extract:

public class HelloService {

  /**
   * Hello RPC service
   */
  public interface Iface {

    /**
     * Hello request
     * @param client_id client id
     *
     * @param client_id
     */
    public void connectRequest(String client_id) throws TException;

  }

Thanks for your consideration,
Chris

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



Re: Small Javadoc issue with parameters

Posted by David Reiss <dr...@facebook.com>.
See test/DocTest.thrift for the way to document parameters.

Brody, Chris wrote:
> Hello,
> 
> I hope I am posting this to the right place. We would like to do quick source code documentation and discovered that Thrift does support Javadoc for the Java source code generation (http://publists.facebook.com/pipermail/thrift/2008-June/001058.html). However, if we specify the @param comments, they show up twice in the generated code. For example:
> 
> namespace java HelloRpc
> 
> /**
>  * Hello RPC service
>  */
> service HelloService {
>   /**
>    * Hello request
>    * @param client_id client id
>    */
>   void connectRequest(1:string client_id)
> 
> }
> 
> Java output extract:
> 
> public class HelloService {
> 
>   /**
>    * Hello RPC service
>    */
>   public interface Iface {
> 
>     /**
>      * Hello request
>      * @param client_id client id
>      *
>      * @param client_id
>      */
>     public void connectRequest(String client_id) throws TException;
> 
>   }
> 
> Thanks for your consideration,
> Chris
> 
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
> 
>