com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: io.swagger.models.properties.RefProperty["$ref"])

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Unable to use swagger-codegen to generate the client api
    via by Ricardo Laranjeiro,
  • GitHub comment 1066#129446080
    via GitHub by wing328
    ,
  • GitHub comment 1287#151703641
    via GitHub by dandonovsc
    ,
  • GitHub comment 1287#142949780
    via GitHub by dandonovsc
    ,
  • GitHub comment 1267#144756101
    via GitHub by bedag-moo
    ,
  • GitHub comment 1066#129392737
    via GitHub by wing328
    ,
    • com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: io.swagger.models.properties.RefProperty["$ref"]) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:210) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:177) at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:187) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:647) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:128) at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:800) at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:676) at io.swagger.util.Json.pretty(Json.java:23) at io.swagger.codegen.DefaultCodegen.fromProperty(DefaultCodegen.java:1361) at io.swagger.codegen.DefaultCodegen.fromParameter(DefaultCodegen.java:2195) at io.swagger.codegen.DefaultCodegen.fromOperation(DefaultCodegen.java:1961) at io.swagger.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:744) at io.swagger.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:688) at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:376) at io.swagger.codegen.cmd.Generate.run(Generate.java:223) at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:36) Caused by: java.lang.NullPointerException at io.swagger.models.properties.RefProperty.get$ref(RefProperty.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:466) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639) ... 13 more
    No Bugmate found.