Swagger is an open source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services. [Link to Swagger website](https://swagger.io/)
Swagger is used to design the SDRangel web API. You will find the Swagger framework for SDRangel here.
<h1>Install Swagger</h1>
Uses `apt-get` package manager (Ubuntu, Debian). Use your distribution package manager for other distributions
The code generator is delivered in the form of a jar that you execute from the console using the java command. First make sure you have a JDK or JRE version 1.7 or above. In our example it will be located in `/opt/install/jdk1.8.0_74/`
Download the jar from [this archive](https://oss.sonatype.org/content/repositories/releases/io/swagger/swagger-codegen-cli/). Choose the latest version ex: 2.2.3 which can be done with wget. Say you want to install the jar in `/opt/install/swagger`:
The language option `-l` allows to generate code or documentation in a lot of languages (invoke the command without any parameter to get a list). The most commonly used are:
- html2: documentation as a single HTML file pretty printed. Used to document the API in code/html2
The configuration option `-c` lets you specify a configuration file which is in JSON format and for which the key, value pairs are documented in the config-help of the specified codegen language. For example the following command will return the possible key values for Qt5 C++ generator: