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 <[email protected]> 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 [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <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 [email protected]. For more options, visit https://groups.google.com/d/optout.
