This documentation is a work in progress and will be released with the WSO2 API Manager 3.0.0 GA release.
Working with SDKs - API Manager 3.0.0 - WSO2 Documentation

All docs This doc
||
Skip to end of metadata
Go to start of metadata

Software Development Kits (SDKs) contain the necessary tool kits and documentation to create an application in a specific programming language/framework. SDKs provide native programming libraries that enable application developers to gain natural access to the APIs within the application code. If an API consumer wants to create an application, they can generate a client side SDK for a supported language/framework and use it to write a software application which can be used to consume the subscribed APIs.

Generating client SDKs

You need to have a valid API subscription in order to use the SDK. WSO2 API Manager (WSO2 API-M) allows SDK generation per API.

WSO2 API-M provides SDKs for Android, Java, and Python by default. If required, you can enable other languages/frameworks from a list of supported languages/frameworks.

If you plan on using one of the default languages/frameworks (i.e., Android, Java, and Python), then move to Step 3 to discover the default SDKs.

Step 1 -  Define the SDK in the deployment.yaml

  • If you define at least one language/framework, only the SDK for the language/framework that you defined appears.

  • If you do not define any languages/frameworks the default three SDKs, namely Android, Java, and Python, appear.

  1. Open the <API-M_HOME>conf/default/deployment.yaml file and edit the file as follows.
  2. Define the language/framework configurations.

    1. Decide on the SDKs that you wish to define.

    2. Add the connfigurations related to sdkLanguageConfigurations: under the wso2.carbon.apimgt: configuration. If wso2.carbon.apimgt: is not already defined, you need to define that as well as shown in the example below.

    3. Copy and paste the language/framework definition from the Supported languages/frameworks for SDKs section

      It is important to use the exact terminology and indentation when defining the language/framework configurations.

      For example let's define Android, Java, Python, C#, and Ruby as the languages/frameworks as follows:

      Example:
        # APIM Configuration Parameters
      wso2.carbon.apimgt:
            # SDK Generation Language Configuration
        sdkLanguageConfigurations:
            # SDK Generation Supported Languages
          sdkGenLanguages:
            android: io.swagger.codegen.languages.AndroidClientCodegen
            java: io.swagger.codegen.languages.JavaClientCodegen
            python: io.swagger.codegen.languages.PythonClientCodegen
            csharp: io.swagger.codegen.languages.CSharpClientCodegen
            ruby:	io.swagger.codegen.languages.RubyClientCodegen

Step 2 - Restart the WSO2 API-M server

After the file is saved, restart the WSO2 API-M server.

Step 3 - Select the SDK

  1. Sign in to the WSO2 API Store.
  2. Click on the API to view its details.
  3. Click on the SDKS tab to see the list of downloadable SDKs.
    The SDK list shows all the languages/frameworks that you defined.

    You can use the search to filter out the specific SDK if there is a long list. The filter for the search option only appears if there are more than 5 languages/frameworks in the list.

Step 4 - Download the SDK

Click DOWNLOAD to download the SDK that corresponds to the preferred language/framework. You can use the SDK to write software applications in order to consume the API.

As mentioned above, a valid subscription should exist for the API. The SDK cannot be used without a valid access token for the subscription.

Supported languages/frameworks for SDKs

The following table lists the supported language/framework configurations to generate client SDKs.

Languages/FrameworksConfiguration
akka-scala:akka-scala: io.swagger.codegen.languages.AkkaScalaClientCodegen
android:android: io.swagger.codegen.languages.AndroidClientCodegen
apex:apex: io.swagger.codegen.languages.ApexClientCodegen
bash:bash: io.swagger.codegen.languages.BashClientCodegen
clojure:clojure: io.swagger.codegen.languages.ClojureClientCodegen
cpprest:cpprest: io.swagger.codegen.languages.CppRestClientCodegen
csharp:csharp: io.swagger.codegen.languages.CSharpClientCodegen
CsharpDotNet2:CsharpDotNet2: io.swagger.codegen.languages.CsharpDotNet2ClientCodegen
dart:dart: io.swagger.codegen.languages.DartClientCodegen
elixir:elixir: io.swagger.codegen.languages.ElixirClientCodegen
flash:flash: io.swagger.codegen.languages.FlashClientCodegen
go:go: io.swagger.codegen.languages.GoClientCodegen
groovy:groovy: io.swagger.codegen.languages.GroovyClientCodegen
java:java: io.swagger.codegen.languages.JavaClientCodegen
javascript:javascript: io.swagger.codegen.languages.JavascriptClientCodegen
javascript-closure-angular:javascript-closure-angular: io.swagger.codegen.languages.JavascriptClosureAngularClientCodegen
jaxrs-cxf-client:jaxrs-cxf-client: io.swagger.codegen.languages.JavaCXFClientCodegen
kotlin:kotlin: io.swagger.codegen.languages.KotlinClientCodegen
objc:objc: io.swagger.codegen.languages.ObjcClientCodegen
perl:perl: io.swagger.codegen.languages.PerlClientCodegen
php:php: io.swagger.codegen.languages.PhpClientCodegen
powershell:powershell: io.swagger.codegen.languages.PowerShellClientCodegen
python:python: io.swagger.codegen.languages.PythonClientCodegen
qt5cpp:qt5cpp: io.swagger.codegen.languages.Qt5CPPGenerator
ruby:ruby: io.swagger.codegen.languages.RubyClientCodegen
scala:scala: io.swagger.codegen.languages.ScalaClientCodegen
swagger:swagger: io.swagger.codegen.languages.SwaggerGenerator
swagger-yaml:swagger-yaml: io.swagger.codegen.languages.SwaggerYamlGenerator
swift:swift: io.swagger.codegen.languages.SwiftCodegen
swift3:swift3: io.swagger.codegen.languages.Swift3Codegen
swift4:swift4: io.swagger.codegen.languages.Swift4Codegen
tizen:tizen: io.swagger.codegen.languages.TizenClientCodegen
typescript-angular:typescript-angular: io.swagger.codegen.languages.TypeScriptAngularClientCodegen
typescript-angular2:typescript-angular2: io.swagger.codegen.languages.TypeScriptAngular2ClientCodegen
typescript-fetch:typescript-fetch: io.swagger.codegen.languages.TypeScriptFetchClientCodegen
typescript-jquery:typescript-jquery: io.swagger.codegen.languages.TypeScriptJqueryClientCodegen
typescript-node:typescript-node: io.swagger.codegen.languages.TypeScriptNodeClientCodegen
  • No labels