Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate cURL command of swagger

We have an API documentation generated by swagger running here and I asked myself how to let swagger generate an additional curl command line example for the current endpoint/method. Is that possible without hacking into skala?

like image 878
Andreas Avatar asked Jan 22 '14 11:01

Andreas


People also ask

What is cURL in API swagger?

cURL, which stands for client URL, is a command line tool that developers use to transfer data to and from a server.

How do you make a cURL command?

Generate Curl from PostmanClick on the Code button. A dialog “GENERATE CODE SNIPPET” will appear. Select “cURL” from the dropdown. You can copy the command using Copy to Clipboard button.

What is cURL command?

curl is a command-line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP, or FILE). curl is powered by Libcurl. This tool is preferred for automation since it is designed to work without user interaction.


1 Answers

simply update your swagger-ui bundle and curl commands section will show up by default

like image 132
cevantes Avatar answered Oct 22 '22 00:10

cevantes