soapui icon indicating copy to clipboard operation
soapui copied to clipboard

Importing OpenApi 3.0.1 json file not working

Open nagendrakamisetti opened this issue 4 years ago • 7 comments

Hi,

Need immediate help. Recently we have upgraded from Swagger 2 to Open API 3. but the exported JSON file from Open API 3 not able to import in SOAP UI and below is the error.

java.lang.NullPointerException: Cannot invoke "com.smartbear.swagger.SwaggerImporter.importSwagger(String)" because "this.val$importer" is null

Any help on this is highly appreciated.

currently below workarounds i am able to use,

  1. by changing the .json file header to swagger 2.0
  2. import into postman, export from postman and then import into SOAP UI

nagendrakamisetti avatar Mar 06 '22 04:03 nagendrakamisetti

Same here Guys, do we have any news?

cgorgesibm avatar May 08 '22 06:05 cgorgesibm

I have also the same issue, though the workaround doesnt solve it for me.

MGede avatar Oct 31 '22 15:10 MGede

i checked source code and found that soapui only support swagger2, so we need convert openapi3 to openapi/swagger2 before load it into soapui

wangguofeng1923 avatar Dec 09 '22 07:12 wangguofeng1923

why did this thread stop in 2022? This still seems to be an issue right? If this is the solution, this seems dangerous, error prone and something that would lead to the eventual death of SoapUI. Unless soapUI is already dead and I wasn't aware. Doing evaluations of various API testing tools. I won't be going with SoapUI

fractalocity avatar Nov 03 '23 19:11 fractalocity

SoapUI 5.7.2 Still not working, but a working workaround:

As mentioned originally in post OAS 3.0 tooling support :

Using https://editor.swagger.io/ and convert JSON definition as yaml file worked!!

jbrasileiro avatar Nov 28 '23 00:11 jbrasileiro

SoapUI 5.8.0

still not working with default json import. i thgouht new big version update should have fixed this basic feature.

wolfesteinabhi avatar Jan 08 '25 08:01 wolfesteinabhi

SoapUI 5.7.2 Still not working, but a working workaround:

As mentioned originally in post OAS 3.0 tooling support :

Using https://editor.swagger.io/ and convert JSON definition as yaml file worked!!

Another workaround seems to be, according to https://community.smartbear.com/discussions/soapui_os/problem-with-importing-openapi/242050/replies/260529:

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

{"openapi":"3.0.1"

with

{"swagger":"2.0"

and then to import the file.

It seems to work for my use case, yet I guess there might be differences in the formats because of which this approach can fail...

pbodnar avatar Jul 07 '25 15:07 pbodnar