tag:blogger.com,1999:blog-6749335146095092303.post4432935063250159980..comments2023-03-29T07:55:26.295+02:00Comments on ole lensmar's blog: SoapUI + Swagger = true!olensmarhttp://www.blogger.com/profile/17766268469247940906noreply@blogger.comBlogger45125tag:blogger.com,1999:blog-6749335146095092303.post-17008254738672390172014-12-17T04:21:56.126+01:002014-12-17T04:21:56.126+01:00Hi!
if you define a GET action at / then that is ...Hi!<br /><br />if you define a GET action at / then that is what you should hit - if you want to get a result for /api-docs.json then you would need to create a GET action at /api-docs.json and set the response to the desired spec... Ready! API does not automatically expose a swagger spec for you (although I agree that would be nice!)<br /><br />/Oleolensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-73376080463208237402014-12-17T04:15:04.315+01:002014-12-17T04:15:04.315+01:00I defined a GET Action, with path /. The Action pr...I defined a GET Action, with path /. The Action provides a simple txt message for either Status 200, or Status 500. When I hit 127.0.0.1:8181/api-docs.json, I get an error 500. The error within SoapUI no longer occurs. Anyway, I fired up a local webserver, just trying to get this figured out. thankyou.jalexanderhttp://parchment.comnoreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-91008670550963229132014-12-16T21:25:57.283+01:002014-12-16T21:25:57.283+01:00Hi!
The error indicates that you'll need to d...Hi!<br /><br />The error indicates that you'll need to define some Mock Actions for your service to which requests can be dispatched... Can you give that a try?<br /><br />thanks!<br /><br />/Oleolensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-10717253753382428872014-12-16T21:23:33.340+01:002014-12-16T21:23:33.340+01:00Hello,
I have followed all the steps in this post,...Hello,<br />I have followed all the steps in this post, using GoogleMaps API. The Swagger code is correctly generated. But I am receiving the following error:<br />2014-12-16 13:07:55.816: [dispatch error; missing response]<br /><br />I am using SoapUI 5.0, with the Mock REST Service. I do not have any Actions defined for my service. Thank you for any help.jalexanderhttp://www.parchment.comnoreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-6028848949130813742014-08-14T01:35:36.676+02:002014-08-14T01:35:36.676+02:00Sebastian - are you using soap ui pro? I can not s...Sebastian - are you using soap ui pro? I can not sem to get the swagger menu itemsAnonymoushttps://www.blogger.com/profile/10858730630970400023noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-26254730540990223372014-08-14T01:34:24.111+02:002014-08-14T01:34:24.111+02:00Yes can not get it work on Mac using SoapUI 5.0 - ...Yes can not get it work on Mac using SoapUI 5.0 - does this only work on SoapUI pro or onlyAnonymoushttps://www.blogger.com/profile/10858730630970400023noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-41593409099088846452014-07-07T15:54:02.565+02:002014-07-07T15:54:02.565+02:00Hi Ole,
IO was wandering if you have been able to...Hi Ole,<br /><br />IO was wandering if you have been able to look at the issue above with the swagger doc I sent over?<br /><br />Thanks,<br />JohnAnonymoushttps://www.blogger.com/profile/10007428033933668703noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-32963813963423921102014-06-25T15:30:26.969+02:002014-06-25T15:30:26.969+02:00Hi Ole,
We tried to use the plugin with SoapUI 4....Hi Ole,<br /><br />We tried to use the plugin with SoapUI 4.5.2 but we are facing the following problems:<br /><br />1. When we select the Resource Listing option while importing Swagger json : The plugin tries to hit the server with the mentioned API set but does not send the parameters of the calls as declared in the json which results in the 400 Bad Request error from server. Please note that we have marked all these parameters as "Required" in the swagger json. Is this behaviour expected? Or, this is a bug?<br /><br />2. When we select the "API Declaration" option : Similar to what John has mentioned above, only one of API is imported into SoapUI & that too without the parameters which have been declared in the Swagger json. Is this the desired behavior?<br /><br />3. When I tried using a json for an API set which doesn't require any parameter in the request : It gave me an error for Unknown Swagger version even though it was specified for Swagger 1.2.<br /><br />Could you please help with the above queries? This would help us proceed with the integration effort.<br /><br />Regards,<br />AbhinavAbhinavhttps://www.blogger.com/profile/10779726507733841694noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-16156394527957682792014-06-24T17:07:42.916+02:002014-06-24T17:07:42.916+02:00Hi Ole,
I have e-mailed you a swagger doc json fi...Hi Ole,<br /><br />I have e-mailed you a swagger doc json file.<br /><br />Many thanks,<br />JohnAnonymoushttps://www.blogger.com/profile/10007428033933668703noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-86493789031812632412014-06-24T16:29:19.490+02:002014-06-24T16:29:19.490+02:00Hi John,
hmm... can you share the swagger file wi...Hi John,<br /><br />hmm... can you share the swagger file with me somehow so I can try it out? (olensmar at gmail)<br /><br />regards!<br /><br />/Oleolensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-1877086759330172512014-06-24T16:26:44.854+02:002014-06-24T16:26:44.854+02:00Hi Ole,
We are using SoapUI 5.0 and the swagger p...Hi Ole,<br /><br />We are using SoapUI 5.0 and the swagger plugin 0.3.1 with the beta 4 swagger4j jar. When we import an API declaration using a swagger doc we find that if an API has more than 1 method only the first method is actually displayed in the SoapUi interface. Is this a bug? There do not seem to be any errors listed in any of the logs.<br /><br />Thanks,<br />JohnAnonymoushttps://www.blogger.com/profile/10007428033933668703noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-71993869798142217022014-05-11T17:33:03.380+02:002014-05-11T17:33:03.380+02:00Ole,
Thanks for the quick response. I didn't s...Ole,<br />Thanks for the quick response. I didn't see a beta jar in the lib dir, all jars have the same date/timestamp as my download. I cant say i didn't have a previous beta download, I do try new versions on occasion. I am currently running a 2wk trial on 5.0. It is in my /Programs Files dir not (86) dir so I believe its a 64bit install if that makes a difference.<br />I will try a fresh download and let you know.<br />thanks,<br />timTimRhttps://www.blogger.com/profile/14728137774687364528noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-47983843599486027202014-05-11T14:33:13.245+02:002014-05-11T14:33:13.245+02:00Hi Tim,
Q1: yes - it works of for me with clean i...Hi Tim,<br /><br />Q1: yes - it works of for me with clean installs of both SoapUI 5.0 and SoapUI 5.0 Pro :-(<br />Q2: yes - I haven't updated the plugin to add this to SoapUI - but I'll do that as soon we sort this out :-)<br /><br />Could it be that you installed the 5.0 release over a beta of 5.0 ? The error you are getting is related to a library change that was made in the beta but reverted in the final release? You could check the soapui-pro/lib folder if it contains a soapui-5.0-beta jar file!? If that doesn't help - could you mail me the contents of the "System Properties" dialog in the SoapUI Help menu? (olensmar(at)gmail.com)<br /><br />Thanks,<br /><br />/Oleolensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-32777473119235681722014-05-11T09:01:53.112+02:002014-05-11T09:01:53.112+02:00Ole,
yes I deleted the older jar (see other reply)...Ole,<br />yes I deleted the older jar (see other reply)<br />Q1: Have you tried to use your new jars/plugin with SoapUI 5.0 Pro against the Pet store Swagger? Were you successful?<br />Q2: One of you posts noted a limitation with Authorization Oauth - is this still the case with SoapUI 5.0 an your new plugin? <br /> my use case requires authorization-token.<br />Thanks,<br />TimTimRhttps://www.blogger.com/profile/14728137774687364528noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-74592022824951497572014-05-11T08:54:55.204+02:002014-05-11T08:54:55.204+02:00Ole,
I did erase the previous version (see below)
...Ole,<br />I did erase the previous version (see below)<br />/bin<br /> /ext<br /> swagger4j-1.0-beta3.jar<br /> javax.json-1.0-b06.jar<br /> /plugin<br /> soapui-swagger-plugin-0.3-plugin.jar<br />1) I create the Generic Project<br />2) File>Import Swagger > File Def: http://petstore.swagger.wordnik.com/api/api-docs (no .json) / Resource Listing (Api throws error)<br />After a few seconds I get <br /> /pet<br /> /pet/{petId}[/api/pet/{petId}]<br /> get getPetById<br />>> nothing else <<<<br /><br />Then the errors listed below<br /><br />http://petstore.swagger.wordnik.com/api/api-docs<br />soapUI log<br />Sat May 10 23:40:56 PDT 2014:ERROR:An error occurred [com.eviware.soapui.impl.rest.RestRequestInterface$RequestMethod], see error log for details<br /><br />[error log]<br />Sat May 10 23:40:56 PDT 2014:ERROR:java.lang.NoClassDefFoundError: com.eviware.soapui.impl.rest.RestRequestInterface$RequestMethod<br /> java.lang.NoClassDefFoundError: com.eviware.soapui.impl.rest.RestRequestInterface$RequestMethod<br /> at com.smartbear.restplugin.SwaggerImporter$_importApiDeclaration_closure2_closure4.class$(SwaggerImporter.groovy)<br /> at com.smartbear.restplugin.SwaggerImporter$_importApiDeclaration_closure2_closure4.$get$$class$com$eviware$soapui$impl$rest$RestRequestInterface$RequestMethod(SwaggerImporter.groovy)<br /> at com.smartbear.restplugin.SwaggerImporter$_importApiDeclaration_closure2_closure4.doCall(SwaggerImporter.groovy:109)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br /> at java.lang.reflect.Method.invoke(Unknown Source)<br /> at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)<br /> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)<br /> at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)<br /> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)<br /> at groovy.lang.Closure.call(Closure.java:411)<br /> at groovy.lang.Closure.call(Closure.java:427)<br /> at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1325)<br /> at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1297)<br /> at org.codehaus.groovy.runtime.dgm$148.invoke(Unknown Source)<br /> at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)<br /> at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)<br /> at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)<br /> at com.smartbear.restplugin.SwaggerImporter$_importApiDeclaration_closure2.doCall(SwaggerImporter.groovy:105)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> <<<< had to remove several lines to make 4k limit >>><br /> at java.awt.EventQueue$3.run(Unknown Source)<br /> at java.security.AccessController.doPrivileged(Native Method)<br /> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)<br /> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)<br /> at java.awt.EventQueue$4.run(Unknown Source)<br /> at java.awt.EventQueue$4.run(Unknown Source)<br /> at java.security.AccessController.doPrivileged(Native Method)<br /> at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)<br /> at java.awt.EventQueue.dispatchEvent(Unknown Source)<br /> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)<br /> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)<br /> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)<br /> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br /> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br /> at java.awt.EventDispatchThread.run(Unknown Source)<br /><br />TimRhttps://www.blogger.com/profile/14728137774687364528noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-54764232607475084182014-05-08T11:53:22.154+02:002014-05-08T11:53:22.154+02:00Hi Tim,
hmm... did you remove the swagger4j-1.0-b...Hi Tim,<br /><br />hmm... did you remove the swagger4j-1.0-beta2.jar file from the ext folder ? Are you getting any errors in the error tab at the bottom of the main SoapUI window?<br /><br />thanks,<br /><br />/Oleolensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-91833535987734778992014-05-08T03:08:53.036+02:002014-05-08T03:08:53.036+02:00Hi Ole, I went here:
http://olensmar.blogspot.com/...Hi Ole, I went here:<br />http://olensmar.blogspot.com/2012/12/testing-swagger-apis-with-soapui-groovy.html<br /> <br />I downloaded your most recent jar swagger4j-1.0-beta3.jar and installed the most recent plugin on SoapUI Pro 5.0<br />I created a Generic Project, and then attempted a Swagger Import using the above URL http://petstore.swagger.wordnik.com/api/api-docs.json. for Swagger Definition. I am not sure which Definition Type to use, I tried both - neither works<br />This no longer works, if I drop the .json and put this url in my firefox I can get to the swagger definition. but if I add this URL to SoapUI it does not work either. Can you tell me what I am doing wrong? TimRhttps://www.blogger.com/profile/14728137774687364528noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-35902833520507855472014-05-07T13:52:51.075+02:002014-05-07T13:52:51.075+02:00Even for me same problem.
RobEven for me same problem.<br />Robnysalsahttps://www.blogger.com/profile/09891198446477340120noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-31896406223948245562014-05-06T00:34:25.748+02:002014-05-06T00:34:25.748+02:00what is RAML plugin ? i am not sure about what you...what is RAML plugin ? i am not sure about what you mean. <br />in around end of 2013, i had pre soap 5.0 installed and i recall was able to generate swagger output from my imported wadl restapi. worked perfect then. <br /><br />now with soap ui 5.0 trying to do the same, fails with the error i reported above even after using the beta-3 jar. <br />Let me know if you need some debug output or anything else.<br />thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-16665830795629601592014-05-06T00:31:42.837+02:002014-05-06T00:31:42.837+02:00as part of the maven build, i generate wadl, would...as part of the maven build, i generate wadl, would be nice to automate the swagger UI output from that wadl as part of the build process. Instead of loading wadl in soap ui first and then doing a swagger output.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-113944040704510522014-05-05T22:26:38.900+02:002014-05-05T22:26:38.900+02:00Hmm... out of curiosity - what is your usage scena...Hmm... out of curiosity - what is your usage scenario for this functionality?<br /><br />thanks!<br /><br />/Ole olensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-82585711441392714852014-05-05T22:25:14.288+02:002014-05-05T22:25:14.288+02:00Darn - I'll update the RAML plugin instead... ...Darn - I'll update the RAML plugin instead... gimme a day or two - sorry to keep you waiting!<br /><br />/Oleolensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-6090055344569056652014-05-05T22:22:57.993+02:002014-05-05T22:22:57.993+02:00also any news on the maven plugin to generate swag...also any news on the maven plugin to generate swagger output from wadl ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-90051037214601561752014-05-05T22:00:15.130+02:002014-05-05T22:00:15.130+02:00Error after copying beta3 jar to SoapUI/bin/ext. P...Error after copying beta3 jar to SoapUI/bin/ext. Please help.<br /><br /> Directory of C:\views\installation\SmartBear\SoapUI-5.0.0\bin\ext<br /> ..<br />05/16/2013 12:04 AM 78,456 javax.json-1.0-b06.jar<br />04/09/2014 10:44 AM 150 readme.txt<br />05/05/2014 03:47 PM 73,857 swagger4j-1.0-beta3.jar<br /><br />Mon May 05 15:52:44 EDT 2014:ERROR:java.lang.NoClassDefFoundError: com.eviware.soapui.impl.rest.RestRequestInterface$RequestMethod<br /> java.lang.NoClassDefFoundError: com.eviware.soapui.impl.rest.RestRequestInterface$RequestMethod<br /> at com.smartbear.restplugin.SwaggerExporter$_generateResourceListing_closure2_closure3_closure4.class$(SwaggerExporter.groovy)<br /> at com.smartbear.restplugin.SwaggerExporter$_generateResourceListing_closure2_closure3_closure4.$get$$class$com$eviware$soapui$impl$rest$RestRequestInterface$RequestMethod(SwaggerExporter.groovy)<br /> at com.smartbear.restplugin.SwaggerExporter$_generateResourceListing_closure2_closure3_closure4.doCall(SwaggerExporter.groovy:107)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br /> at java.lang.reflect.Method.invoke(Unknown Source)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6749335146095092303.post-67888360409933573022014-05-05T05:11:06.141+02:002014-05-05T05:11:06.141+02:00Hi all,
I've updated the swagger4j library t...Hi all, <br /><br />I've updated the swagger4j library that was causing these issues (for me at least) - please grab the latest version from https://sourceforge.net/projects/swagger4j/files/1.0-beta3/ and replace the beta2 version of swagger4j in your SoapUI/bin/ext folder with it.<br /><br />Let me know if that helps - thanks!<br /><br />/Oleolensmarhttps://www.blogger.com/profile/17766268469247940906noreply@blogger.com