Hi!,
I want to try SoapUI out at work to see if it could make our life easier (I'm a QA and test a ton of our APIs regularly) but I'm running into a problem when trying to import one of our APIs definition from swagger.
Basically what I do is I create an empty project then right click on it -> import from swagger -> I leave 'Definition Type' set to 'Resource Listing' and in the 'Swagger Definition' field point it to ${ourAppHost}/v2/api-docs.json. I click accept then it asks me for username/password (our API needs authentication) but then I get an error message saying it can't find something.
The error message says this:
groovy.lang.MissingPropertyException: No such property: path for class: com.smartbear.swagger.Swagger2Importer
And the logs show this:
2016-02-15 23:22:33,314 ERROR [SoapUI] An error occurred [No such property: path for class: com.smartbear.swagger.Swagger2Importer], see error log for details 2016-02-15 23:22:33,314 ERROR [errorlog] groovy.lang.MissingPropertyException: No such property: path for class: com.smartbear.swagger.Swagger2Importer groovy.lang.MissingPropertyException: No such property: path for class: com.smartbear.swagger.Swagger2Importer at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.callGroovyObjectGetProperty(GetEffectivePogoPropertySite.java:69) at com.smartbear.swagger.Swagger2Importer.createRestService(Swagger2Importer.groovy:222) at com.smartbear.swagger.Swagger2Importer.this$2$createRestService(Swagger2Importer.groovy) at com.smartbear.swagger.Swagger2Importer$this$2$createRestService.callCurrent(Unknown Source) at com.smartbear.swagger.Swagger2Importer.importSwagger(Swagger2Importer.groovy:72) at com.smartbear.swagger.SwaggerImporter$importSwagger.call(Unknown Source) at com.smartbear.swagger.SwaggerUtils$1.construct(SwaggerUtils.groovy:75) at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46) at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:131) at java.lang.Thread.run(Unknown Source)
I thought there might be something that's not correctly configured with my installation (I'm using SoapUI free version 5.2.1) but then I tried to load a public API in the same way (this one) and it loaded up correctly and imported all the endpoints.
In my app we don't have a /v2/swagger.json like in the public api that works but we do have it in /v2/api-docs.json and if I go there in a browser I get this (the host is masked since it is a private app):
which looks pretty similar to the one in the link above that works.
Any idea what I might be doing wrong? Is there anything I'm missing?.
Thanks!.