New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imported Swagger 2.0 YAML uses the wrong path variable syntax #4598
Comments
Hi @erodewald, The current postman importers transform the path variables in the colon (:) based syntax and do not convert the path variables into native postman variables. We are currently working on revamping the suite of the postman importers where we will include better usage of the native postman variables when a specification is imported. |
Any further progress on this? I recently tried to import our company's Swagger 2.0 spec into postman and every request requires significant massaging. This would be very useful to have working correctly. |
Also would like to enquire around further progress. Not being able to import a valid swagger 2.0/openapi 3.0 spec using path variables is a huge productivity killer. It basically renders Postman useless for us as it takes significant effort to manually edit every request to fix these anomalies. |
Quick little workaround:
|
I think the issue that I'm dealing with is related to this. If is not let me know and I'll open another one.
only the first variable is being converted to |
Most recent release 7.22.1 does not seem to fix this bug for me. Can anyone confirm that their path variables are resolving correctly on swagger/openAPI import? I still just get the |
The path variables from swagger schema are converted to path variables in postman. Anything with a For the ones that are not part of a URL segment we create collection variables with @natepappenhagen @erodewald @cjlotz I would like to know more how are the path variables in Swagger and OpenAPI are used, so that we can decide the changes accordingly. |
I still have this issue on Postman 7.25.0 |
@QA-automation-engineer See the post above. Can you please give examples of how you're using path variables and how they are resolved for you? This will help us understand in which case this doesn't work and let us reproduce the issue if possible. |
Hi all, I really appreciate the great work on Postman. Totally agree w/ @natepappenhagen's last comment that having these path variables as collection variables ( |
I don't think that having every variable be collection variable is a good idea since having something like a userId is request (path) specific and not specific the collection as a whole. I think that having the userId be different for different request/path is important for some monitoring/testing scenario. |
@Lacni135 |
same problem here, what is actually ":parameter" syntax for? Does it have some semantics? Or is is just for immediate manual variables replace? |
I'm still seeing this issue but with JSON: Imported Swagger JSON uses the wrong path variable syntax Imported: Expected: Actual: Postman Mac App v 7.36.1 and Postman web via Mac Chrome |
Seeing the same import issue with swagger.json, is there a fix for this yet? Imported Expected Actual: Postman for Windows |
@natepappenhagen Thanks for the suggestion for an "option" for this. Seems like that would be the way to go about this, as the way path params/variables are used in postman is different for every user. Here is an earlier comment explaining our rationale behind this: #4598 (comment) |
Sorry to bump this, but is there any news on @natepappenhagen suggestion? |
Any updates on this? When I'm testing locally I may want to only test with a specific user for all of my routes. Example:
Ideally on import Postman would see all of the path variables in the spec (at least on import, even better dynamically later) then allow me to choose whether each segment should be a collection variable or not. |
I don't understand why it is closed by :
because changelog in 7.22 https://github.com/postmanlabs/postman-app-support/pull/8296/files
I think it was closed by mistake |
Describe the bug
When importing a swagger 2.0 spec in YAML format, the path variables are using the
:variable
syntax instead of{{variable}}
, preventing them from being parsed as variables by the Postman client.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Path variables should use correct
{{variable}}
syntax, just like query param variables.Screenshots
Import looks like this:
Path definition:
Param definition:
What I expect to see:
App information (please complete the following information):
Additional context
None that I am aware of.
The text was updated successfully, but these errors were encountered: