Hi Tam, Not sure what you mean by 'the definition'. But our module is Spring base with Hateoas. After compile phase, we pass the java package to swagger-m-p to generate swagger jsonschema spec
We use swagger-m-p with latest swagger-core to get support for @JsonUnwrap. Even if remove all @JsonUnwrap anotion, still see same NPE Appreciate any help -Dan > On Thursday, May 25, 2017 at 7:56:36 PM UTC-7, tony tam wrote: > > Can you please share the definition that you’re using? Looks to me like > you have something like this: > > type: array > > without an inner items type: > > type: array > items: > type: string > > > > On May 25, 2017, at 7:32 PM, Dan Tran <dan...@gmail.com <javascript:>> > wrote: > > > Hi > > I am using swagger-maven-plugin to generate swagger spec and NPE at > swagger-core > > > private void handleUnwrapped(List<Property> props, Model innerModel, > String prefix, String suffix) { > if (StringUtils.isBlank(suffix) && StringUtils.isBlank(prefix)) { > props.addAll(innerModel.getProperties().values()); > } else { > if (prefix == null) { > prefix = ""; > } > if (suffix == null) { > suffix = ""; > } > for (Property prop : innerModel.getProperties().values()) { > props.add(prop.rename(prefix + prop.getName() + suffix)); > } > } > } > > with this stack trace > > Caused by: java.lang.NullPointerException > at > io.swagger.jackson.ModelResolver.handleUnwrapped(ModelResolver.java:608) > at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:441) > at > com.github.kongchen.swagger.docgen.reader.ModelModifier.resolve(ModelModifier.java:96) > at io.swagger.jackson.ModelResolver.resolve(ModelResolver.java:183) > at > com.github.kongchen.swagger.docgen.reader.ModelModifier.resolve(ModelModifier.java:90) > at > io.swagger.converter.ModelConverterContextImpl.resolve(ModelConverterContextImpl.java:100) > at > io.swagger.converter.ModelConverters.read(ModelConverters.java:66) > at > com.github.kongchen.swagger.docgen.reader.AbstractReader.updateApiResponse(AbstractReader.java:431) > at > com.github.kongchen.swagger.docgen.reader.JaxrsReader.parseMethod(JaxrsReader.java:341) > > > Debug true shows innerModel is null > > What could be a potential problem i an look further? > > Thanks > > -D > > -- > 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 <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > > -- 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/optout.