Skip to content

Feature request for Swagger UI: view a request as a curl command #1073

@joelparkerhenderson

Description

@joelparkerhenderson

Based on #580

In Swagger UI, when I view an API doc, there is a "Try it out" button that runs the request.

The feature request is for a UI feature that enables a way to view a request as a curl command.

For example, imagine a button that says "View as curl". Tap the button, and a div expands (or popup displays) which shows the corresponding curl command line. The user can then copy/paste the curl command into any typical shell.

This feature request is to solve a current pain point for my team: we rely on curl for many of our needs, and the curl commands for each endpoint are in our current API docs, which are not Swagger. This feature implementation will enable us to move completely to Swagger.

My understanding from the above is that the capability to generate the curl command is a recent addition to swagger.js.

Thanks for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions