You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i try a GET without the header header_field for the first time the request is passed with the right parameters
the curl request is the following:
curl -X GET "http://localhost:8000/api/v1/path/" -H "accept: application/json"
Now I try a second time with a value of header_field
curl -X GET "http://localhost:8000/api/v1/path/" -H "accept: application/json" -H "header_field: f94dcbff-ca94-4fe3-9c4c-731aae66790d"
Now the problem is when I try a request for the 3rd time whithout the header_field
curl -X GET "http://localhost:8000/api/v1/path/" -H "accept: application/json" -H "header_field: "
as you can see in the curl request, the -H "header_field" was not removed from the request and gets a "" instead of undifined value. That creates a problem in my case because "" is not considered as a valid uuid.
I think it would be convenient to check the headers in the execute function (swagger-editor/dist/swagger-editor-bundle.js) and to set the fields with an empty string to undifined
I tryed adding this line after declaring the variables and it works as expected:
From @5aledBos on July 19, 2018 18:25
Hi,
I encountered a bug while handling headers.
Here an example of a GET method on the endpoint
/path/
:When i try a GET without the header
header_field
for the first time the request is passed with the right parametersthe curl request is the following:
Now I try a second time with a value of
header_field
Now the problem is when I try a request for the 3rd time whithout the
header_field
as you can see in the curl request, the
-H "header_field"
was not removed from the request and gets a""
instead ofundifined
value. That creates a problem in my case because""
is not considered as a valid uuid.I think it would be convenient to check the headers in the
execute
function (swagger-editor/dist/swagger-editor-bundle.js
) and to set the fields with an empty string toundifined
I tryed adding this line after declaring the variables and it works as expected:
Configuration used
Copied from original issue: swagger-api/swagger-editor#1843
The text was updated successfully, but these errors were encountered: