Re: [Dev] Code formatting for swagger2MSF4J

2017-11-13 Thread Inosh Perera
Hi Viduranga,

Yes, I had a look at this too. As you said it uses Google styling.

Regards,
Inosh

On Tue, Nov 14, 2017 at 9:22 AM, Viduranga Gunarathne 
wrote:

> Hi,
> This java code formatter[1] from Google can be used to programmatically
> format java code. But this plugin re-formats the code in accordance to the
> Google Java Style[2]
>
> [1] https://github.com/google/google-java-format
> [2] https://google.github.io/styleguide/javaguide.html
>
> Thanks,
> Viduranga.
>
> On Tue, Nov 14, 2017 at 9:13 AM, Inosh Perera  wrote:
>
>> Hi Sanjeewa,
>>
>> Noted. Thanks.
>>
>> On Tue, Nov 14, 2017 at 8:44 AM, Sanjeewa Malalgoda 
>> wrote:
>>
>>> Yes agree with abimaran. Since this same code runs on swagger online
>>> editor and this use as generic tool i think we do not need to add licence
>>> headers.
>>> Class, method name constructing logic followed standard swagger way of
>>> generating code. However you might need to add licence before you commit
>>> code.
>>>
>>> Thanks,
>>> sanjeewa.
>>>
>>> On Tue, Nov 14, 2017 at 8:18 AM, Inosh Perera  wrote:
>>>
 Hi Abimaran,

 Understood. Thanks for the clarification.

 Regards,
 Inosh

 On Mon, Nov 13, 2017 at 5:36 PM, Abimaran Kugathasan  wrote:

> Hi Inosh,
>
> On Mon, Nov 13, 2017 at 2:27 PM, Inosh Perera  wrote:
>
>> Hi All,
>>
>> I'm writing device type APIs for IoT server and I have written a yaml
>> that I'm trying to convert[1] to MSF4J. When checking the generated code,
>> it looks bit messy and there is no proper formatting or license headers 
>> in
>> the generated code. Is there a way to do this with io.swagger.codegen or 
>> is
>> it done manually?
>>
>
>  Normally we don't format the code or license header for the generated
> code. License can be added through mustache files. But, this code gen 
> don't
> have the capability to auto format the code as class names, parameters
> names are depends on your API swagger file parameters. It's hard to 
> format.
>
> Also, since this gen directory is replace each time you generate the
> code, we don't do anything manually there. But, functionality should work.
>
> [1]: https://github.com/sanjeewa-malalgoda/swagger2MSF4J/tre
> e/master/src/main/resources/MSF4J
>
>>
>> [1]. https://github.com/sanjeewa-malalgoda/swagger2MSF4J
>>
>> Regards,
>> Inosh
>>
>> --
>> Inosh Perera
>> Senior Software Engineer, WSO2 Inc.
>> Tel: 077813 7285, 0785293686 <078%20529%203686>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820 <+94%2077%20392%202820>
>
> 
> 
>   
> 
>
>


 --
 Inosh Perera
 Senior Software Engineer, WSO2 Inc.
 Tel: 077813 7285, 0785293686 <078%20529%203686>

>>>
>>>
>>>
>>> --
>>>
>>> *Sanjeewa Malalgoda*
>>> WSO2 Inc.
>>> Mobile : +94713068779 <+94%2071%20306%208779>
>>>
>>> blog
>>> :http://sanjeewamalalgoda.blogspot.com/
>>> 
>>>
>>>
>>>
>>
>>
>> --
>> Inosh Perera
>> Senior Software Engineer, WSO2 Inc.
>> Tel: 077813 7285, 0785293686
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Regards,
>
> *Viduranga Gunarathne*
>
> *Software Engineer Intern*
>
>
> *WSO2*
> Email : vidura...@wso2.com
> Mobile : +94712437484 <+94%2071%20243%207484>
> Web : http://wso2.com
> [image: https://wso2.com/signature] 
>



-- 
Inosh Perera
Senior Software Engineer, WSO2 Inc.
Tel: 077813 7285, 0785293686
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Code formatting for swagger2MSF4J

2017-11-13 Thread Viduranga Gunarathne
Hi,
This java code formatter[1] from Google can be used to programmatically
format java code. But this plugin re-formats the code in accordance to the
Google Java Style[2]

[1] https://github.com/google/google-java-format
[2] https://google.github.io/styleguide/javaguide.html

Thanks,
Viduranga.

On Tue, Nov 14, 2017 at 9:13 AM, Inosh Perera  wrote:

> Hi Sanjeewa,
>
> Noted. Thanks.
>
> On Tue, Nov 14, 2017 at 8:44 AM, Sanjeewa Malalgoda 
> wrote:
>
>> Yes agree with abimaran. Since this same code runs on swagger online
>> editor and this use as generic tool i think we do not need to add licence
>> headers.
>> Class, method name constructing logic followed standard swagger way of
>> generating code. However you might need to add licence before you commit
>> code.
>>
>> Thanks,
>> sanjeewa.
>>
>> On Tue, Nov 14, 2017 at 8:18 AM, Inosh Perera  wrote:
>>
>>> Hi Abimaran,
>>>
>>> Understood. Thanks for the clarification.
>>>
>>> Regards,
>>> Inosh
>>>
>>> On Mon, Nov 13, 2017 at 5:36 PM, Abimaran Kugathasan 
>>> wrote:
>>>
 Hi Inosh,

 On Mon, Nov 13, 2017 at 2:27 PM, Inosh Perera  wrote:

> Hi All,
>
> I'm writing device type APIs for IoT server and I have written a yaml
> that I'm trying to convert[1] to MSF4J. When checking the generated code,
> it looks bit messy and there is no proper formatting or license headers in
> the generated code. Is there a way to do this with io.swagger.codegen or 
> is
> it done manually?
>

  Normally we don't format the code or license header for the generated
 code. License can be added through mustache files. But, this code gen don't
 have the capability to auto format the code as class names, parameters
 names are depends on your API swagger file parameters. It's hard to format.

 Also, since this gen directory is replace each time you generate the
 code, we don't do anything manually there. But, functionality should work.

 [1]: https://github.com/sanjeewa-malalgoda/swagger2MSF4J/tre
 e/master/src/main/resources/MSF4J

>
> [1]. https://github.com/sanjeewa-malalgoda/swagger2MSF4J
>
> Regards,
> Inosh
>
> --
> Inosh Perera
> Senior Software Engineer, WSO2 Inc.
> Tel: 077813 7285, 0785293686 <078%20529%203686>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Thanks
 Abimaran Kugathasan
 Senior Software Engineer - API Technologies

 Email : abima...@wso2.com
 Mobile : +94 773922820 <+94%2077%20392%202820>

 
 
   
 


>>>
>>>
>>> --
>>> Inosh Perera
>>> Senior Software Engineer, WSO2 Inc.
>>> Tel: 077813 7285, 0785293686 <078%20529%203686>
>>>
>>
>>
>>
>> --
>>
>> *Sanjeewa Malalgoda*
>> WSO2 Inc.
>> Mobile : +94713068779 <+94%2071%20306%208779>
>>
>> blog
>> :http://sanjeewamalalgoda.blogspot.com/
>> 
>>
>>
>>
>
>
> --
> Inosh Perera
> Senior Software Engineer, WSO2 Inc.
> Tel: 077813 7285, 0785293686
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,

*Viduranga Gunarathne*

*Software Engineer Intern*


*WSO2*
Email : vidura...@wso2.com
Mobile : +94712437484
Web : http://wso2.com
[image: https://wso2.com/signature] 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Code formatting for swagger2MSF4J

2017-11-13 Thread Inosh Perera
Hi Sanjeewa,

Noted. Thanks.

On Tue, Nov 14, 2017 at 8:44 AM, Sanjeewa Malalgoda 
wrote:

> Yes agree with abimaran. Since this same code runs on swagger online
> editor and this use as generic tool i think we do not need to add licence
> headers.
> Class, method name constructing logic followed standard swagger way of
> generating code. However you might need to add licence before you commit
> code.
>
> Thanks,
> sanjeewa.
>
> On Tue, Nov 14, 2017 at 8:18 AM, Inosh Perera  wrote:
>
>> Hi Abimaran,
>>
>> Understood. Thanks for the clarification.
>>
>> Regards,
>> Inosh
>>
>> On Mon, Nov 13, 2017 at 5:36 PM, Abimaran Kugathasan 
>> wrote:
>>
>>> Hi Inosh,
>>>
>>> On Mon, Nov 13, 2017 at 2:27 PM, Inosh Perera  wrote:
>>>
 Hi All,

 I'm writing device type APIs for IoT server and I have written a yaml
 that I'm trying to convert[1] to MSF4J. When checking the generated code,
 it looks bit messy and there is no proper formatting or license headers in
 the generated code. Is there a way to do this with io.swagger.codegen or is
 it done manually?

>>>
>>>  Normally we don't format the code or license header for the generated
>>> code. License can be added through mustache files. But, this code gen don't
>>> have the capability to auto format the code as class names, parameters
>>> names are depends on your API swagger file parameters. It's hard to format.
>>>
>>> Also, since this gen directory is replace each time you generate the
>>> code, we don't do anything manually there. But, functionality should work.
>>>
>>> [1]: https://github.com/sanjeewa-malalgoda/swagger2MSF4J/tre
>>> e/master/src/main/resources/MSF4J
>>>

 [1]. https://github.com/sanjeewa-malalgoda/swagger2MSF4J

 Regards,
 Inosh

 --
 Inosh Perera
 Senior Software Engineer, WSO2 Inc.
 Tel: 077813 7285, 0785293686 <078%20529%203686>

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Thanks
>>> Abimaran Kugathasan
>>> Senior Software Engineer - API Technologies
>>>
>>> Email : abima...@wso2.com
>>> Mobile : +94 773922820 <+94%2077%20392%202820>
>>>
>>> 
>>> 
>>>   
>>> 
>>>
>>>
>>
>>
>> --
>> Inosh Perera
>> Senior Software Engineer, WSO2 Inc.
>> Tel: 077813 7285, 0785293686 <078%20529%203686>
>>
>
>
>
> --
>
> *Sanjeewa Malalgoda*
> WSO2 Inc.
> Mobile : +94713068779 <+94%2071%20306%208779>
>
> blog :http://sanjeewamalalgoda.
> blogspot.com/ 
>
>
>


-- 
Inosh Perera
Senior Software Engineer, WSO2 Inc.
Tel: 077813 7285, 0785293686
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Code formatting for swagger2MSF4J

2017-11-13 Thread Sanjeewa Malalgoda
Yes agree with abimaran. Since this same code runs on swagger online editor
and this use as generic tool i think we do not need to add licence headers.
Class, method name constructing logic followed standard swagger way of
generating code. However you might need to add licence before you commit
code.

Thanks,
sanjeewa.

On Tue, Nov 14, 2017 at 8:18 AM, Inosh Perera  wrote:

> Hi Abimaran,
>
> Understood. Thanks for the clarification.
>
> Regards,
> Inosh
>
> On Mon, Nov 13, 2017 at 5:36 PM, Abimaran Kugathasan 
> wrote:
>
>> Hi Inosh,
>>
>> On Mon, Nov 13, 2017 at 2:27 PM, Inosh Perera  wrote:
>>
>>> Hi All,
>>>
>>> I'm writing device type APIs for IoT server and I have written a yaml
>>> that I'm trying to convert[1] to MSF4J. When checking the generated code,
>>> it looks bit messy and there is no proper formatting or license headers in
>>> the generated code. Is there a way to do this with io.swagger.codegen or is
>>> it done manually?
>>>
>>
>>  Normally we don't format the code or license header for the generated
>> code. License can be added through mustache files. But, this code gen don't
>> have the capability to auto format the code as class names, parameters
>> names are depends on your API swagger file parameters. It's hard to format.
>>
>> Also, since this gen directory is replace each time you generate the
>> code, we don't do anything manually there. But, functionality should work.
>>
>> [1]: https://github.com/sanjeewa-malalgoda/swagger2MSF4J/
>> tree/master/src/main/resources/MSF4J
>>
>>>
>>> [1]. https://github.com/sanjeewa-malalgoda/swagger2MSF4J
>>>
>>> Regards,
>>> Inosh
>>>
>>> --
>>> Inosh Perera
>>> Senior Software Engineer, WSO2 Inc.
>>> Tel: 077813 7285, 0785293686 <078%20529%203686>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thanks
>> Abimaran Kugathasan
>> Senior Software Engineer - API Technologies
>>
>> Email : abima...@wso2.com
>> Mobile : +94 773922820 <+94%2077%20392%202820>
>>
>> 
>> 
>>   
>> 
>>
>>
>
>
> --
> Inosh Perera
> Senior Software Engineer, WSO2 Inc.
> Tel: 077813 7285, 0785293686 <078%20529%203686>
>



-- 

*Sanjeewa Malalgoda*
WSO2 Inc.
Mobile : +94713068779

blog
:http://sanjeewamalalgoda.blogspot.com/

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Code formatting for swagger2MSF4J

2017-11-13 Thread Inosh Perera
Hi Abimaran,

Understood. Thanks for the clarification.

Regards,
Inosh

On Mon, Nov 13, 2017 at 5:36 PM, Abimaran Kugathasan 
wrote:

> Hi Inosh,
>
> On Mon, Nov 13, 2017 at 2:27 PM, Inosh Perera  wrote:
>
>> Hi All,
>>
>> I'm writing device type APIs for IoT server and I have written a yaml
>> that I'm trying to convert[1] to MSF4J. When checking the generated code,
>> it looks bit messy and there is no proper formatting or license headers in
>> the generated code. Is there a way to do this with io.swagger.codegen or is
>> it done manually?
>>
>
>  Normally we don't format the code or license header for the generated
> code. License can be added through mustache files. But, this code gen don't
> have the capability to auto format the code as class names, parameters
> names are depends on your API swagger file parameters. It's hard to format.
>
> Also, since this gen directory is replace each time you generate the code,
> we don't do anything manually there. But, functionality should work.
>
> [1]: https://github.com/sanjeewa-malalgoda/swagger2MSF4J/tree/master/src/
> main/resources/MSF4J
>
>>
>> [1]. https://github.com/sanjeewa-malalgoda/swagger2MSF4J
>>
>> Regards,
>> Inosh
>>
>> --
>> Inosh Perera
>> Senior Software Engineer, WSO2 Inc.
>> Tel: 077813 7285, 0785293686
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820 <+94%2077%20392%202820>
>
> 
> 
>   
> 
>
>


-- 
Inosh Perera
Senior Software Engineer, WSO2 Inc.
Tel: 077813 7285, 0785293686
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Code formatting for swagger2MSF4J

2017-11-13 Thread Abimaran Kugathasan
Hi Inosh,

On Mon, Nov 13, 2017 at 2:27 PM, Inosh Perera  wrote:

> Hi All,
>
> I'm writing device type APIs for IoT server and I have written a yaml that
> I'm trying to convert[1] to MSF4J. When checking the generated code, it
> looks bit messy and there is no proper formatting or license headers in the
> generated code. Is there a way to do this with io.swagger.codegen or is it
> done manually?
>

 Normally we don't format the code or license header for the generated
code. License can be added through mustache files. But, this code gen don't
have the capability to auto format the code as class names, parameters
names are depends on your API swagger file parameters. It's hard to format.

Also, since this gen directory is replace each time you generate the code,
we don't do anything manually there. But, functionality should work.

[1]:
https://github.com/sanjeewa-malalgoda/swagger2MSF4J/tree/master/src/main/resources/MSF4J


>
> [1]. https://github.com/sanjeewa-malalgoda/swagger2MSF4J
>
> Regards,
> Inosh
>
> --
> Inosh Perera
> Senior Software Engineer, WSO2 Inc.
> Tel: 077813 7285, 0785293686
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Email : abima...@wso2.com
Mobile : +94 773922820 <+94%2077%20392%202820>


  
  
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Code formatting for swagger2MSF4J

2017-11-13 Thread Inosh Perera
Hi All,

I'm writing device type APIs for IoT server and I have written a yaml that
I'm trying to convert[1] to MSF4J. When checking the generated code, it
looks bit messy and there is no proper formatting or license headers in the
generated code. Is there a way to do this with io.swagger.codegen or is it
done manually?

[1]. https://github.com/sanjeewa-malalgoda/swagger2MSF4J

Regards,
Inosh

-- 
Inosh Perera
Senior Software Engineer, WSO2 Inc.
Tel: 077813 7285, 0785293686
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev