Forum Discussion

kcollinsbigpan's avatar
kcollinsbigpan
New Contributor
3 months ago
Solved

Try it out not working - Incorrect cURL with Swagger 2.0

I am using SwaggerHub and local hosted Swagger 2.0 swagger files (using swagger ui) to create interactive API documentation on our site, but the code generated by the Try it out feature is malformed ...
  • Tom_S's avatar
    3 months ago

    Hello there! The URL is always generated with quotes, there's no way to change it. To add bearer token you can try to modify the securitySchemes section of your OpenAPI document to explicitly define Bearer authentication. You can find more details in OAS documentation below:

    https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/