swagger-codegen-maven-plugin thread safe?

2017-07-26 Thread Dan Tran
Hi My maven build show this warning [WARNING] The following plugins are not marked @threadSafe in adm-agent-core: [WARNING] io.swagger:swagger-codegen-maven-plugin:2.2.2 [WARNING] org.codehaus.mojo:flatten-maven-plugin:1.0.0 [WARNING] Enable debug to see more precisely which goals are not marke

Re: NPE with swagger-codegen 2.2.3 maven plugin

2017-07-26 Thread Dan Tran
; > > > > *From: * on behalf of Dan Tran < > dant...@gmail.com> > *Reply-To: *"swagger-swaggersocket@googlegroups.com" < > swagger-swaggersocket@googlegroups.com> > *Date: *Wednesday, 26 July 2017 at 0:31 > *To: *Swagger > *Subject: *Re: NPE wit

Re: NPE with swagger-codegen 2.2.3 maven plugin

2017-07-26 Thread Dan Tran
stack trace update java.lang.RuntimeException: Could not process operation: Tag: AssetGroups Operation: addAssets Resource: put /api/v2/assetGroups/{id}/assetList Definitions: {Addresses=io.swagger.models.ModelImpl@9901aa0, AppHost=io.swagger.models.ModelImpl@8456d641, Exception:

NPE with swagger-codegen 2.2.3 maven plugin

2017-07-25 Thread Dan Tran
Hi I currently facing this stack trace java.lang.RuntimeException: Could not process operation: Tag: AssetGroups Operation: addAssets Resource: put /api/v2/assetGroups/{id}/assetList Definitions: {Addresses=io.swagger.models.ModelImpl@9901aa0, AppHost=io.swagger.models.ModelImpl@8456d64

Re: Definition for java.time.Instant as String??

2017-05-29 Thread Dan Tran
swagger-maven-plugin's modelSubstitute configuration can globally swapping out java.time.Instant for java.util.Date during swagger spec generation. Thanks -Dan On Sunday, May 28, 2017 at 11:00:33 PM UTC-7, Dan Tran wrote: > > > I have to many places to add this annotation. Is

Re: Definition for java.time.Instant as String??

2017-05-28 Thread Dan Tran
I have to many places to add this annotation. Is there a way to set it globally? Thanks On Sunday, May 28, 2017 at 2:58:19 PM UTC-7, Dan Tran wrote: > > > @ApiModelProperty(dataType="date") > private Instant completionTime; > > works for me

Re: Definition for java.time.Instant as String??

2017-05-28 Thread Dan Tran
@ApiModelProperty(dataType="date") private Instant completionTime; works for me. Thanks -Dan -- 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 swagg

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-28 Thread Dan Tran
I am able to pin point to a couple of scenarios, filed the issue at https://github.com/swagger-api/swagger-core/issues/ -- 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 e

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-27 Thread Dan Tran
Drill down some more. I found the innerModel is null b/c its propType ls [simple type, class java.lang.Object] (from debugger). Here is the line handleUnwrapped(props, context.resolve(propType), uw.prefix(), uw.suffix()); By ignore this NPE, my build is good, the generated @JsonUnwrapped

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-27 Thread Dan Tran
I am able to reproduce the NPE with a small maven project. it has nothing to do with Spring Hateoas. NPE only happens with @JsonUnwrapped field where it class has no 'get' method. -D -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscri

Definition for java.time.Instant as String??

2017-05-26 Thread Dan Tran
Hi By default swagger-maven-plugin generates the below block for java.time.Instant "xxxName" : { "type" : "integer", "format" : "int64" }, However, my actual payload is a ISO8601 format using internal custom serializer with Jackson ObjectMapper. Therefor

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-26 Thread Dan Tran
able to get @JsonUnwrapped working with and without Spring? Thanks -Dan On Friday, May 26, 2017 at 12:53:37 AM UTC-7, Dan Tran wrote: > > > swagger-3.1.4 + swagger-model-1.5.9 work, and it does not scan Spring > Hateoas. Is there a option with swagger-core-1.5.12+ to do the same

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-26 Thread Dan Tran
swagger-3.1.4 + swagger-model-1.5.9 work, and it does not scan Spring Hateoas. Is there a option with swagger-core-1.5.12+ to do the same? Thanks -Dan On Friday, May 26, 2017 at 12:23:30 AM UTC-7, Dan Tran wrote: > > Ah, now we toasted. > > swagger-m-p-3.1.3 which uses swagge

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-26 Thread Dan Tran
one would expect for that definition in JSON Schema. > > On May 25, 2017, at 10:37 PM, Dan Tran > > wrote: > > here is maven debug log > > [DEBUG] resolve class org.springframework.hateoas.Resource > [DEBUG] trying extension > com.github.kongchen.swagger.docgen

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-25 Thread Dan Tran
here is maven debug log [DEBUG] resolve class org.springframework.hateoas.Resource [DEBUG] trying extension com.github.kongchen.swagger.docgen.reader.ModelModifier@1de4285e [DEBUG] defineModel Resource io.swagger.models.ModelImpl@67d75b4c [DEBUG] resolve [simple type, class java.lang.Object] [DEB

Re: NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-25 Thread Dan Tran
hout an inner items type: > > type: array > items: > type: string > > > > On May 25, 2017, at 7:32 PM, Dan Tran > > wrote: > > > Hi > > I am using swagger-maven-plugin to generate swagger spec and NPE at > swagger-core > > >

NPE at io.swagger.jackson.ModelResolver.handleUnwrapped()

2017-05-25 Thread Dan Tran
Hi I am using swagger-maven-plugin to generate swagger spec and NPE at swagger-core private void handleUnwrapped(List props, Model innerModel, String prefix, String suffix) { if (StringUtils.isBlank(suffix) && StringUtils.isBlank(prefix)) { props.addAll(innerModel.get

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

2017-03-05 Thread Dan Tran
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-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/opto