Forum Discussion

bfourie's avatar
bfourie
Occasional Contributor
9 years ago
Solved

MissingPropertyException on swagger import

Hi,

I'm trying to create a new project from the swagger.json file.

In Swagger, I've opened the root /swagger.json url, copied the text, and saved on my desktop.

I then created a new project, rightclicked and selected import swagger. I point it to this swagger file.

When clicking OK, I'm presented with the following error message:

groovy.lang.MissingPropertyException: No such property: path for class: com.smartbear.swagger.Swagger2Importer

I then upgraded my client to the latest version, and tried again. It gave me the same error.

 

Any one know what could cause this?

I really dont feel like creating all those resources by hand.

  • Hi!

     

    ooops - my bad - you're right, 2.2.1 is the latest :-)

     

    Can you share your Swagger definition? If so - please mail it to ole@swagger.io and I'll have a look - thanks!

    /Ole

7 Replies

    • bfourie's avatar
      bfourie
      Occasional Contributor

      Here with the logs:

       

      2015-11-16 21:15:41,886 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:53)
      at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:87)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
      at com.smartbear.swagger.Swagger2Importer.createRestService(Swagger2Importer.groovy:229)
      at com.smartbear.swagger.Swagger2Importer.this$2$createRestService(Swagger2Importer.groovy)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
      at com.smartbear.swagger.Swagger2Importer.importSwagger(Swagger2Importer.groovy:79)
      at com.smartbear.swagger.SwaggerImporter$importSwagger.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at com.smartbear.swagger.SwaggerUtils$1.construct(SwaggerUtils.groovy:85)
      at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:48)
      at com.eviware.soapui.support.swing.SwingWorker.run(SwingWorker.java:88)

       

       

      • bfourie's avatar
        bfourie
        Occasional Contributor

        The error points to a bug in the code. Like the ReadyAPI client is accessing a propperty called "Path" in the class Swagger2Importer that does not exist. But if this is the case, my guess is this has never worked for anyone.

         

        My setup is pretty standard... Straight forward  readyapi install, nothing funny there.