Forum Discussion

darekdg6pl's avatar
New Member
2 years ago

Problem with importing openapi

Team, I'm facing problems with importing OpenAPI specification.

SoapUI 5.7.0, Windows, schema, error I got:

  • Fri Dec 09 09:43:15 CET 2022:ERROR:java.lang.NullPointerException: Cannot invoke "com.smartbear.swagger.SwaggerImporter.importSwagger(String)" because "this.val$importer" is null
  • java.lang.NullPointerException: Cannot invoke "com.smartbear.swagger.SwaggerImporter.importSwagger(String)" because "this.val$importer" is null
  • at com.smartbear.swagger.SwaggerUtils$1.construct(
  • at
  • at$
  • at java.base/

Any suggestions what might be wrong? The specification seems to be just fine. Thanks for any advice!

2 Replies

  • mcarmain's avatar
    Occasional Visitor

    I have same issue importing swagger.json that is version 3

  • mju's avatar
    Regular Visitor

    The code tests for the swagger version and the logic is basically:

    if (yaml or yml) import with swagger2

    else //i.e. .json

      if (version = swagger 2.0) import with swagger2

      else return null ==> exception


    The workaround for openapi files in .json format seems to be to replace this (e.g. for version 3.0.1)




     and then to import the file.