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 <[email protected]>
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 <[email protected]> wrote:
>
>> Hi Sanjeewa,
>>
>> Noted. Thanks.
>>
>> On Tue, Nov 14, 2017 at 8:44 AM, Sanjeewa Malalgoda <[email protected]>
>> 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 <[email protected]> wrote:
>>>
>>>> Hi Abimaran,
>>>>
>>>> Understood. Thanks for the clarification.
>>>>
>>>> Regards,
>>>> Inosh
>>>>
>>>> On Mon, Nov 13, 2017 at 5:36 PM, Abimaran Kugathasan <[email protected]
>>>> > wrote:
>>>>
>>>>> Hi Inosh,
>>>>>
>>>>> On Mon, Nov 13, 2017 at 2:27 PM, Inosh Perera <[email protected]> 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
>>>>>> [email protected]
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks
>>>>> Abimaran Kugathasan
>>>>> Senior Software Engineer - API Technologies
>>>>>
>>>>> Email : [email protected]
>>>>> Mobile : +94 773922820 <+94%2077%20392%202820>
>>>>>
>>>>> <http://stackoverflow.com/users/515034>
>>>>> <http://lk.linkedin.com/in/abimaran>
>>>>> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
>>>>> <https://twitter.com/abimaran>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Inosh Perera
>>>> Senior Software Engineer, WSO2 Inc.
>>>> Tel: 077813 7285, 0785293686 <078%20529%203686>
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> *Sanjeewa Malalgoda*
>>> WSO2 Inc.
>>> Mobile : +94713068779 <+94%2071%20306%208779>
>>>
>>> <http://sanjeewamalalgoda.blogspot.com/>blog
>>> :http://sanjeewamalalgoda.blogspot.com/
>>> <http://sanjeewamalalgoda.blogspot.com/>
>>>
>>>
>>>
>>
>>
>> --
>> Inosh Perera
>> Senior Software Engineer, WSO2 Inc.
>> Tel: 077813 7285, 0785293686
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Regards,
>
> *Viduranga Gunarathne*
>
> *Software Engineer Intern*
>
>
> *WSO2*
> Email : [email protected]
> Mobile : +94712437484 <+94%2071%20243%207484>
> Web : http://wso2.com
> [image: https://wso2.com/signature] <https://wso2.com/signature>
>



-- 
Inosh Perera
Senior Software Engineer, WSO2 Inc.
Tel: 077813 7285, 0785293686
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to