Search code examples
swaggerswagger-editor

Specifying example swagger queries other than curl


In all implementations of swagger API documentation I have seen, the only query example format seems to be curl, as in this screenshot:

swagger curl query

Is it possible to specify other language formats, as per API docs using readme.io etc., in this screenshot:

readme.io query options


Solution

  • Since swagger is open source, you can modify it as per your requirement.

    It comes bundled with CURL, but you are free to change the code and use what you deem fit, just be sure to give proper attribution to the original creators of Swagger.

    For your specific requirement, you should make changes to the javascript files swagger-ui and swagger-ui-min