luckymarmot / Paw-SwaggerImporter

Swagger/OpenAPI 2.0 Importer for Paw
https://paw.cloud/extensions/SwaggerImporter
MIT License
38 stars 10 forks source link

cannot export when using environment variables #27

Closed ridvanbaluyos closed 8 years ago

ridvanbaluyos commented 8 years ago

i use environment variables for my requests. when i tried exporting it to swagger, i'm getting

Javascript Exception: undefined is not an object (evaluating 'content.length') ){
...
}

is there a way for me to export my requests to swagger definition when using environment variables?

JonathanMontane commented 8 years ago

@ridvanbaluyos thanks for the report! Yes, you should be able to use environment variables, and this should not happen.

Would you mind providing us the next few lines of the error you get, they are only related to the internal way the extension works and would help us tremendously in solving this issue?

On a side note, other users reported a similar issue and it had nothing to do with environment variables, but with urls not containing a protocol (such as http or https). We are currently fixing this issue, and hope to deploy a fix within the next few hours, it would be great if we could also fix yours at the same (or if it is the same issue).

ridvanbaluyos commented 8 years ago

Hi @JonathanMontane

i'm using environment variables for my url: https://postimg.org/image/c75uecfvf/

Below is the complete error: https://postimg.org/image/m4wwecx0r/

JavaScript Exception: TypeError: undefined is not an object (evaluating 'content.length') ({
    column = 40;
    line = 2066;
})

hope it helps.

JonathanMontane commented 8 years ago

@ridvanbaluyos yup, looks like the same error as the one we're currently fixing. Thank you for the quick reply!

Here's a dummy request that exhibits the same traits as yours, it is now fixed!

image

Expect a release in the next 2 hours.

ridvanbaluyos commented 8 years ago

thanks @JonathanMontane for the quick actions! will wait for the fix. :)

JonathanMontane commented 8 years ago

@ridvanbaluyos release is out, can you try it and check if it fixed your issue?

ridvanbaluyos commented 8 years ago

hi @JonathanMontane

it's now working and can generate the swagger file. thanks for your quick response! :)