postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.78k stars 837 forks source link

Path parameter as extension not detected #8016

Open cbetta opened 4 years ago

cbetta commented 4 years ago

One of our endpoints is the Get file thumbnail API which allows a user to specify the thumbnail format in the path as an extension.

Screenshot 2020-02-07 at 15 43 39

We recently realised that Postman doesn't actually support a path parameter like this, as the param isn't preceded by a forward slash. As such, the param is missing from the list of fields to configure.

Screenshot 2020-02-07 at 16 10 26

As this is valid in OpenAPI it seems like this ought to be valid in Postman as well.

shamasis commented 4 years ago

Path parameters are only supported if it is in the entire URL segment. However, you can use the {{extension}} representation instead.

cbetta commented 4 years ago

@shamasis sure but that doesn't expose it as a path param but as a collection variable.

Mechanicalkeyboard commented 3 years ago

We are continuing to look at solutions to this, another potential work around is to put the entire thumbnail.png as the path param. It's not ideal as user would have to populate it with a value such as "thumbnail.png"