How to make Swagger codegen to generate @JsonInclude(Include.NON_NULL) in java pojo classes

3,099 views
Skip to first unread message

Archana Sukesh

unread,
Feb 15, 2017, 5:22:10 PM2/15/17
to Swagger
Hi,

I m using Swagger-codegen maven plugin to create java pojo classes. But i need to have @JsonInclude(Include.NON_NULL) and @JsonInclude(Include.NON_EMPTY ) in the java pojo classes generated. Currently we are manually adding it after pojo classes are created. Is there any way for Swagger-codegen to add it when it is generating pojo classes. 
  
Thanks.

Archana Sukesh

unread,
Feb 17, 2017, 4:22:29 PM2/17/17
to Swagger
Hi,
Please let me know if any you faced similar problem and solved it.

calde...@yahoo.com

unread,
Feb 18, 2017, 12:07:20 AM2/18/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Fri, 2/17/17, Archana Sukesh <archa...@gmail.com> wrote:

Subject: Re: How to make Swagger codegen to generate @JsonInclude(Include.NON_NULL) in java pojo classes
To: "Swagger" <swagger-sw...@googlegroups.com>
Date: Friday, February 17, 2017, 11:22 PM

Hi,Please let me know if any you faced
--

You received this message because you are subscribed to the
Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails
from it, send an email to swagger-swaggers...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
i mostenitori sa fie crescuti in religia tarii.

calde...@yahoo.com

unread,
Feb 18, 2017, 12:12:38 AM2/18/17
to swagger-sw...@googlegroups.com
n acelasi timp unii oameni politici de cultura si militari care se aflau in strainatate incercand sa se opuna regimului comunist in curs de stabilizare in Romania s-au straduit sa puna bazele exilului romanesc. intre acestia pot fi mentionati generalul Nicolae Radescu Viorel V. Ti ea Constantin Visoianu Grigore Gafencu generalul Ion Gheorghe Grigore Niculescu-Buzesti Brutus Coste Victor Cadere. S-a constituit Comitetul National Roman care urma sa atraga atentia lumii asupra consecintelor instaurarii comunismului in Romania. Acesta cuprindea 10 membri dintre personalitatile reprezentative ale exilului romanesc. in 1950 a fost numit la conducerea sa Constantin Visoianu. Comitetul a organizat la Paris Societatea Culturala Caro 1 care a publicat periodicul La Nation Roumaine . Exilatii romani au participat de asemenea la activitatea unor organisme internationale ca Free Europe Committee National Committee fora Free Europe Assembly of Captive European Nations.

Archana Sukesh

unread,
Feb 22, 2017, 5:29:15 PM2/22/17
to Swagger
Hi,
It will be really helpful if anyone knows how to solve it.


On Wednesday, February 15, 2017 at 5:22:10 PM UTC-5, Archana Sukesh wrote:

Dan Tran

unread,
Mar 5, 2017, 5:30:21 PM3/5/17
to Swagger
same here

calde...@yahoo.com

unread,
Mar 5, 2017, 6:19:28 PM3/5/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Mon, 3/6/17, Dan Tran <dan...@gmail.com> wrote:

Subject: Re: How to make Swagger codegen to generate @JsonInclude(Include.NON_NULL) in java pojo classes
To: "Swagger" <swagger-sw...@googlegroups.com>
Date: Monday, March 6, 2017, 12:30 AM

same here



--

You received this message because you are subscribed to the
Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails
from it, send an email to swagger-swaggers...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

septembrie 1848 a avut loc a treia Adunare Populara de la Blaj la care ticipat taranii romani organizati militar de catre Avram lancu. A treia re Nationala a romanilor de la Blaj s-a transformat insa intr-o veritabila militara taraneasca. Acestia luasera armele in conditiile regimului de ' introdus de autoritatile maghiare - masacre precum cel de la Mihalt unile de la Oradea Arad din Bihor si Fagaras formarea unui corp militar > de Lajos Csanysl trimis impotriva romanilor.

wing328

unread,
Apr 3, 2017, 1:41:43 AM4/3/17
to Swagger, calde...@yahoo.com
I would suggest you to start a discussion via https://github.com/swagger-api/swagger-codegen/issues/new so that the swagger codegen community can help you out.

One way is to modify the template and pass the customized templates via the `-t` option.

calde...@yahoo.com於 2017年3月6日星期一 UTC+8上午7時19分28秒寫道:

--------------------------------------------
On Mon, 3/6/17, Dan Tran <dan...@gmail.com> wrote:

 Subject: Re: How to make Swagger codegen to generate @JsonInclude(Include.NON_NULL) in java pojo classes
 To: "Swagger" <swagger-sw...@googlegroups.com>
 Date: Monday, March 6, 2017, 12:30 AM
 
 same here
 
 
 
 --
 
 You received this message because you are subscribed to the
 Google Groups "Swagger" group.
 
 To unsubscribe from this group and stop receiving emails

Archana Sukesh

unread,
Apr 3, 2017, 3:15:09 PM4/3/17
to Swagger, calde...@yahoo.com
Thank you. I have created discussion in swagger codegen.
Reply all
Reply to author
Forward
0 new messages