Skip to content

Instantly share code, notes, and snippets.

@fabiohecht
Created October 27, 2023 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiohecht/66ca64cc7e342136eca6e62341cf26f7 to your computer and use it in GitHub Desktop.
Save fabiohecht/66ca64cc7e342136eca6e62341cf26f7 to your computer and use it in GitHub Desktop.
# autocomplete in json request body...
### works well without variables
POST https://petstore.swagger.io/api/v2/pet
Content-Type: application/json
{
"name": "Rufus"
}
### works well with host in variable
POST https://{{var_petstore_swagger_io}}/api/v2/pet
Content-Type: application/json
{
"name": "Rufus"
}
### works well with host and one path element in variable
POST https://{{var_petstore_swagger_io}}/{{var_api}}/v2/pet
Content-Type: application/json
{
"name": "Rufus"
}
### FAILS with basePath from petstore.yml in variable
POST https://{{var_petstore_swagger_io}}{{var_slash_api_slash_v2}}/pet
Content-Type: application/json
{
"name": "Rufus"
}
### FAILS with basePath from petstore.yml in variable with one slash
POST https://{{var_petstore_swagger_io}}/{{var_api_slash_v2}}/pet
Content-Type: application/json
{
"name": "Rufus"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment