1
votes

I receive API via swagger format with dynamic variables:

"/tour/{tour_id}/": {
    // ...
},

Swagger-importer extension imports these variables like this:enter image description here

It looks like environmental variable and Paw creates random value for request, but looks like it's unable to create environment variable for this.

I plan to receive API from backend developers via swagger export files and don't want to change requests because they will be overwritten with every import. It would be great to import API as is from backend and just edit environment variables.

1

1 Answers

2
votes

The Swagger / Open API Initiative does not specify that parameters sharing the same name are the same parameter, and it makes sense as the constraints on each parameter could be different based on the operation being done. Therefore, Paw cannot merge parameters together into an environment variable.

Swagger does define a root level field named parameters, which can be used to share parameters between requests, and the Swagger Importer could move these into environment variables, but that's as far as it can go, considering the swagger spec.

This would be nice to have, but that feature is not on the roadmap for next month, although it will probably be introduced later on (I created an issue on github to remember it)