fb
API Management 3 min

SDK with WSO2 API Manager

Domenique Mulder
Domenique Mulder
Head Of Connext
WSO2Torial witruimte 1 1
Scroll

We’ve been writing a lot about the digital transformation and how your company can benefit of opening up to the outside world. We wrote how to create beautiful API’s and even gave you guidelines how to make your API’s better from a developers point of view. In the end it all comes down to interaction; perfectly created, documented and managed API’s are as good as they are adopted by their users. As my colleague Dusan already wrote: “If you are a really serious player, consider to provide SDKs for popular programming languages”. In this blog I will talk aboutHow to deliver a SDK with WSO2 API Manager.

By providing SDKs (Software Development Kits) you give application developers an easy to use solution to integrate your services in their apps simply by importing the SDK module into their development project. This way, developers don’t have to go through the hassle of creating complex solutions on consuming your APIs and all their functions.

A challenge providing this service will be the fact that an SDK is programming language dependant. And that’s where we got you covered (again J).

WSO2 API Manager 2.10 supports Swagger-codegen, a template-driven engine to generate documentation and SDKs for all kinds of languages. By default SDK generation is enabled for Java and Android an those SDKs will be available for all API subscribers in your API Store.

You can find the offered SDKs in the API store by opening the API details and click on the “SDKs” tab:

SDK with WSO2 API Manager - WSO2 API Store WorldBank 1.0.0

Depending on your target audience, you might have a requirement for SDKs in different programming languages. Good to know WSO2 API manager supports all common used languages: 

  • ActionScript
  • Bash
  • C# (.net 2.0, 4.0 or later)
  • C++ (cpprest, Qt5, Tizen)
  • Clojure
  • Dart
  • Elixir
  • Go
  • Groovy
  • Haskell
  • Java (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign)
  • js (ES5, ES6, AngularJS with Google Closure Compiler annotations) 
  • Objective-C
  • Perl
  • PHP
  • Python
  • Ruby
  • Scala
  • Swift (2.x, 3.x)
  • Typescript (Angular1.x, Angular2.x, Fetch, jQuery, Node)

How to add support for language of your audience? The configuration for supported languages can be found in your API-Manager.xml configuration, here is how to apply changes in 3 simple steps:

1. Open your API-Manager configuration file (<APIM_Home>/repository/conf/api-mamanger.xml) and find the <SupportedLanguages> property of the <SwaggerCodegen> element.

<SwaggerCodegen>
   <ClientGeneration>
       <GroupId>org.wso2</GroupId>
       <ArtifactId>org.wso2.client.</ArtifactId>
       <ModelPackage>org.wso2.client.model.</ModelPackage>
       <ApiPackage>org.wso2.client.api.</ApiPackage>
       <!-- Configure supported languages/Frameworks as comma
separated values,
       Supported Languages/Frameworks : android, java, scala, csharp, cpp, dart, flash, go, groovy, javascript, jmeter,
       nodejs, perl, php, python, ruby, swift, clojure, aspNet5, asyncScala, spring, csharpDotNet2, haskell-->
       <SupportedLanguages>java,android</SupportedLanguages>
   </ClientGeneration>
</SwaggerCodegen>

2. Add the required language to the <SupportedLanguages> property. If you need multiple languages use a comma to separate them. In this example we add support for php, python and while we are at it, let’s generate a testcase for Apache Jmeter too (!)


<SwaggerCodegen>

   <ClientGeneration>
       <GroupId>org.wso2</GroupId>
       <ArtifactId>org.wso2.client.</ArtifactId>
       <ModelPackage>org.wso2.client.model.</ModelPackage>
       <ApiPackage>org.wso2.client.api.</ApiPackage>
       <!-- Configure supported languages/Frameworks as comma separated values,
        Supported Languages/Frameworks : android, java, scala, csharp, cpp, dart, flash, go, groovy, javascript, jmeter,
        nodejs, perl, php, python, ruby, swift, clojure, aspNet5, asyncScala, spring, csharpDotNet2, haskell-->       <SupportedLanguages>java,android,php,python,jmeter</SupportedLanguages>
   </ClientGeneration>
</SwaggerCodegen>

3. After saving your configuration file, restart WSO2 API Manager and find your SDKs in the API Store:

SDK with WSO2 API Manager - API STORE SDK

There you go; another great feature of WSO2 API Manager that will help your API consumers implement your services into their applications. Interested in more options of the API manager and how Yenlo can help you in your digital transformation? Feel free to drop us a line!

{{cta(‘32316960-e9a3-4fd2-b463-9b158e3f4ff4’)}}

 

Full API lifecycle Management Selection Guide

WHITEPAPER

smartmockups l0qqucke