-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Path Parameter is not being passed through Request URL and Curl Command. #9979
Comments
It's most probably because of the fact that swagger-client now utilizes spec compliant Path Templating implementation. The spec is still ambiguous about various cases like the one that probably affects you. More info OAI/OpenAPI-Specification#3256 (comment) |
Hi @char0n, Thanks for addressing this issue. We were also suspecting the same. So, we tried to remove extra space from endpoints parameter names, it works for single path parameter, but it doesn't work for more than one Path-parameter. In case of multi parameters - we could see the value only for the first param and the second param will have undefined. example : FirstParameter:- 'xyz', Request URL Response :- we also tried Response: same as above Please let us know if there is any other alternative way to resolve this issue. Your help would be greatly appreciated. Thanks. |
Hm then that's strange. If you have path parameters matching the template (have you changed the |
Facing a similar problem with path parameter and URL like So, my question is do you recognize a URL like |
@char0n @krishnaktcs I am also seeing this issue. Please consider prioritizing this fix as it is part of the core functionality of the product and as-is severely limits it's usability. Using
Here is there relevant yaml commented in-line using swagger-js-doc , with some details changed for security.
In my testing, only the first parameter listed is properly interpolated into the cURL statement, and this behavior is consistently observable when re-ordering the parameters. The relevant cURL statement will be as follows:
|
Hello @char0n @krishnaktcs I have recently updated Swagger UI to 5.17.14 and I am seeing regressions for all path parameters that contain the "=" sign (similar to the issue reported by @igor-tatarnikov-idt ). My Swagger Spec looks like this: I cannot revert to Swagger UI 5.17.6 because of DOMPurity library vulnerability. |
Can you please confirm you can still see the issues in latest SwaggerUI release? |
This seems to be resolved |
@falbert-ptc thanks for confirming. Closing this issue. Please reopen if this is not resolved. |
Hi Everyone,
I am facing issues in swagger UI, all APIs are working fine in my local but not working in Production (only few APIs are working).
Earlier APIs was working fine in my local and Production but suddenly It stopped working.
version: Local and Production same version I am using.
example :
GET [/ABC/{First Parameter / ID}/{Second Parameter}]
Response :-
Code Details
404
Error: Not Found
Response body
Unrecognized response type; displaying content as text.
Download
[ xyz - BackEnd Application Server ] - Unknown Comman
Request URL
https://abc.com/ABC/{First Parameter / ID}/{Second Parameter}
curl -X 'GET' \ 'https://abc.com/ABC/{First Parameter / ID}/{Second Parameter}' \ -H 'accept: /'
Anyone can help me on this?
The text was updated successfully, but these errors were encountered: