Search code examples
swaggerswagger-uiswagger-editor

Swagger UI generating wrong Curl command


Swagger UI generating wrong Curl command as pasted below and due to this query string truncating

curl -X GET http://domain:8080/v1/endpoint?access_token=affsfafasfa&type=1 -H "accept: application/json" -H "content-type: application/json"

the correct Curl command should be like this

curl -X GET 'http://domain:8080/v1/endpoint?access_token=affsfafasfa&type=1' -H "accept: application/json" -H "content-type: application/json"

the difference between above two command is quote around http url . So please tell me how to achieve this in swagger ui ?


Solution

  • Its an bug in swagger ui version 3.0.2 and swagger support team has fixed this bug now https://github.com/swagger-api/swagger-ui/issues/2839