Skip to main content

Generating Clients for the API with Swagger Codegen

This document outlines how to use Swagger Codegen to generate client libraries for various programming languages from the API OpenAPI specification located at


Supported Languages:

Swagger Codegen supports numerous languages. Here are some popular options:

  • Node.js (TypeScript)
  • Python
  • PHP
  • Java
  • Ruby
  • C#
  • Go
  • Swift
  • Kotlin
  • R
  • And many more...


  1. Open a terminal.
  2. Download swagger codegen cli.
  3. Generate client for each language:

Replace telemetrio-client with your desired output directory name and adjust the language tag (-l) accordingly.

Download swagger-codegen-cli.jar
curl --output swagger-codegen-cli.jar

List of supported languages

java -jar swagger-codegen-cli.jar langs     
Available languages: [dart, aspnetcore, csharp, csharp-dotnet2, go, go-server, 
dynamic-html, html, html2, java, jaxrs-cxf-client, jaxrs-cxf, inflector,
jaxrs-cxf-cdi, jaxrs-spec, jaxrs-jersey, jaxrs-di, jaxrs-resteasy-eap,
jaxrs-resteasy, java-vertx, micronaut, spring, nodejs-server,
openapi, openapi-yaml, kotlin-client, kotlin-server, php, python, python-flask,
r, ruby, scala, scala-akka-http-server, swift3, swift4, swift5, typescript-angular,
typescript-axios, typescript-fetch, javascript]

General Command:

java -jar swagger-codegen-cli.jar generate \
-i \
-o telemetrio-client


Node.js (TypeScript):

java -jar swagger-codegen-cli.jar generate \
-i \
-l typescript-fetch \
-o telemetrio-node-client


java -jar swagger-codegen-cli.jar generate \
-i \
-l python \
-o telemetrio-python-client


java -jar swagger-codegen-cli.jar generate \
-i \
-l java \
-o telemetrio-java-client


java -jar swagger-codegen-cli.jar generate \
-i \
-l ruby \
-o telemetrio-ruby-client


java -jar swagger-codegen-cli.jar generate \
-i \
-l r \
-o telemetrio-r-client

Further Customization:

  • Explore additional options offered by Swagger Codegen to customize the generated code. Refer to the Swagger Codegen documentation for details:
  • For advanced users, modify the generator templates to tailor the code further.

Using the Generated Clients:

  • Each generated client library will typically include:
    • Classes or functions representing API endpoints.
    • Models for data types used in requests and responses.
    • Authentication configuration methods (if applicable).
  • Refer to the specific documentation within the generated code for detailed usage instructions.

Node.js (TypeScript) generated client usage example:

import {Configuration, ChannelsApi} from './telemetrio-node-client';

const config = new Configuration({
apiKey: 'YOUR_API_KEY'

let channels = new ChannelsApi(config);"telegram").then(rs => {

Additional Resources:

I hope this expanded documentation provides a clearer understanding of generating clients for various languages with Swagger Codegen. Feel free to ask if you have any further questions!