luckymarmot / API-Flow

Universal data structure and converter for API formats (Swagger, RAML, Paw, Postman…)
MIT License
194 stars 24 forks source link

Paw Export failed to markdown + curl #157

Open jtraviss opened 4 years ago

jtraviss commented 4 years ago

Paw extension version: 0.1.9

Error message:

JavaScript Exception: TypeError: undefined is not an object (evaluating 'ds.length') ({
    column = 20;
    line = 2277;
})
winsmith commented 2 years ago

This seems to be related to Environment Variables. As soon as I introduce a {Host} variable to the URL of one request, the export fails. This also happens to the Preview pane when selecting a single Request. Here are reproduction steps:

  1. Create a new Request called e.g. "Example Request", set it to GET https://example.com/test
  2. Enable Environment Variables and Configure a Host variable to point to example.com
  3. Duplicate the Example Request, call it "Example Request with Variable" and set it to GET https://{Host}/test

Result: The Example Request with Variable can't be exported by the Markdown Curl Exporter, and it will show an empty preview pane

Expected Result: The Example Request with Variable should be exportable without error, and it should show up in the preview pane


https://github.com/luckymarmot/Paw-MarkdownCurlGenerator/issues/6#issuecomment-1000220137