[APIM] Generating SDKs for APIs in API Manager Store

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[APIM] Generating SDKs for APIs in API Manager Store

Viduranga Gunarathne
Hi,

API Manager 3.0.0 supports generating SDKs for published APIs in the API store so that it can provide native language libraries for developers to access and utilize APIs without the hassle of coding the client side implementations by themselves. 
This feature allows the clients to download SDKs from a wide variety of languages which suit their requirements and the generated SDKs contain their own documentation that can guide the users on how to use them. 

The user documentation[1] for the feature in API Manager 3.0.0 is shared in this mail and please find it in the attachments.

The implementation of the feature is as follows:

1) REST API to retrieve list of supported languages
A REST API has been implemented to retrieve a list of supported languages for the SDK generation.
This allows the front end UI to depict the list of languages that are currently configured for SDK generation. In this sample only 3 (Java, Python, Android) are configured but other languages can be added by changing a configuration file (Section 3).
===========================================================================
===========================================================================
2) REST API to generate SDKs
The second REST API is to generate an SDK for a specific API for a particular language. This allows the user to request an SDK for an API for a language of his/her choice and in return will get to download a zip file containing the SDK. This feature is supported by the swagger-codegen[2] and it supports 41 languages for client stub generation. Swagger codegen uses the OpenAPI specification (swagger definition) of the API to generate the SDK.
===========================================================================

===========================================================================
  • ​Sample request:
    GET <a href="https://localhost:9292/api/am/store/v1.0/apis/{apiId}/generate-sdk/{language}">https://localhost:9292/api/am/store/v1.0/apis/{apiId}/generate-sdk/{language} 
    HEADERS Authorization : Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
    Eg: https://localhost:9292/api/am/store/v1.0/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/sdks/java
          HEADERS Authorization : Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8

    There are two parameters in concern.
    i) apiId : The unique identifier of the API
    ii) language : The programming language for which the SDK should be generated.

  • Sample response:
    <API_NAME>_<LANGUAGE>_<API_VERSION>.zip
    Eg: Petstore_java_1.0.0.zip
3) Supported language configurations
By default API Manager Store only allows 3 languages (Java, Python, Android) to generate SDKs. The default configurations are loaded by a bean unless over-ridden by a user specified configuration in the "deployment.yaml". More languages can be added based on the user requirements by a simple edit to the deployment.yaml. The front-end and back-end both utilize the same configuration to show the user the list of languages and to generate the SDK respectively.
===========================================================================

===========================================================================

Below is a sample configuration that can be included in the deployment.yaml to enable other languages. The configurations for all the supported languages are listed in the feature documentation[1]. 



Both 1) and 2) REST APIs are enabled with OAuth 2.0 security under "apim: subscribe" scope.

4) User Interface in the APIM Store
===========================================================================


​===========================================================================

Any feedback or suggestions are highly appreciated!

Thanks,
Viduranga.
---------------------------

--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20243%207484" value="+94712437484" target="_blank">+94712437484
Web : http://wso2.com
https://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Sanjeewa Malalgoda


On Tue, Oct 17, 2017 at 5:54 PM, Viduranga Gunarathne <[hidden email]> wrote:
Hi,

API Manager 3.0.0 supports generating SDKs for published APIs in the API store so that it can provide native language libraries for developers to access and utilize APIs without the hassle of coding the client side implementations by themselves. 
This feature allows the clients to download SDKs from a wide variety of languages which suit their requirements and the generated SDKs contain their own documentation that can guide the users on how to use them. 

The user documentation[1] for the feature in API Manager 3.0.0 is shared in this mail and please find it in the attachments.

The implementation of the feature is as follows:

1) REST API to retrieve list of supported languages
A REST API has been implemented to retrieve a list of supported languages for the SDK generation.
This allows the front end UI to depict the list of languages that are currently configured for SDK generation. In this sample only 3 (Java, Python, Android) are configured but other languages can be added by changing a configuration file (Section 3).
===========================================================================
===========================================================================
2) REST API to generate SDKs
The second REST API is to generate an SDK for a specific API for a particular language. This allows the user to request an SDK for an API for a language of his/her choice and in return will get to download a zip file containing the SDK. This feature is supported by the swagger-codegen[2] and it supports 41 languages for client stub generation. Swagger codegen uses the OpenAPI specification (swagger definition) of the API to generate the SDK.
===========================================================================

===========================================================================
3) Supported language configurations
By default API Manager Store only allows 3 languages (Java, Python, Android) to generate SDKs. The default configurations are loaded by a bean unless over-ridden by a user specified configuration in the "deployment.yaml". More languages can be added based on the user requirements by a simple edit to the deployment.yaml. The front-end and back-end both utilize the same configuration to show the user the list of languages and to generate the SDK respectively.
===========================================================================

===========================================================================

Below is a sample configuration that can be included in the deployment.yaml to enable other languages. The configurations for all the supported languages are listed in the feature documentation[1]. 
Do we have programmable option to enable/disable supported languages(by calling REST API)? Or we need to restart server after adding supported language? As i remember swagger code gen knows classes for each language and we need to override client code gen class name only if we are not using default one. 

Thanks,
sanjeewa.  



Both 1) and 2) REST APIs are enabled with OAuth 2.0 security under "apim: subscribe" scope.

4) User Interface in the APIM Store
===========================================================================


​===========================================================================

Any feedback or suggestions are highly appreciated!

Thanks,
Viduranga.
---------------------------

--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20243%207484" value="+94712437484" target="_blank">+94712437484
Web : http://wso2.com
https://wso2.com/signature

--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : +94713068779

blog :http://sanjeewamalalgoda.blogspot.com/



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Viduranga Gunarathne
Hi Sanjeewa,

i) As per the current implementation there is no programmable option to enable/disable or even to configure the supported languages. The user has to edit the deployment.yaml and then restart the server. 
ii) Swagger codegen does know the classes relevant to each language. That is we can simply use "java" instead of "io.swagger.codegen.languages.JavaClientCodegen" and swagger-codegen will invoke the relevant class. But the reason to use the full class path is because it will be intuitive to a user as to which class files are used for the relevant languages and if he/she wants to do some modifications to the client codegen classes, then this approach will make things easier. 
If having the full class path is a bit cumbersome, one still can change the configurations as follows.

Java language configuration:
Replace "java: io.swagger.codegen.languages.JavaClientCodegen" with "java: java" in the deployment.yaml

PS: One should be mindful about the spellings and the case.

Thanks,
Viduranga.

On Fri, Oct 20, 2017 at 9:23 AM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Tue, Oct 17, 2017 at 5:54 PM, Viduranga Gunarathne <[hidden email]> wrote:
Hi,

API Manager 3.0.0 supports generating SDKs for published APIs in the API store so that it can provide native language libraries for developers to access and utilize APIs without the hassle of coding the client side implementations by themselves. 
This feature allows the clients to download SDKs from a wide variety of languages which suit their requirements and the generated SDKs contain their own documentation that can guide the users on how to use them. 

The user documentation[1] for the feature in API Manager 3.0.0 is shared in this mail and please find it in the attachments.

The implementation of the feature is as follows:

1) REST API to retrieve list of supported languages
A REST API has been implemented to retrieve a list of supported languages for the SDK generation.
This allows the front end UI to depict the list of languages that are currently configured for SDK generation. In this sample only 3 (Java, Python, Android) are configured but other languages can be added by changing a configuration file (Section 3).
===========================================================================
===========================================================================
2) REST API to generate SDKs
The second REST API is to generate an SDK for a specific API for a particular language. This allows the user to request an SDK for an API for a language of his/her choice and in return will get to download a zip file containing the SDK. This feature is supported by the swagger-codegen[2] and it supports 41 languages for client stub generation. Swagger codegen uses the OpenAPI specification (swagger definition) of the API to generate the SDK.
===========================================================================

===========================================================================
3) Supported language configurations
By default API Manager Store only allows 3 languages (Java, Python, Android) to generate SDKs. The default configurations are loaded by a bean unless over-ridden by a user specified configuration in the "deployment.yaml". More languages can be added based on the user requirements by a simple edit to the deployment.yaml. The front-end and back-end both utilize the same configuration to show the user the list of languages and to generate the SDK respectively.
===========================================================================

===========================================================================

Below is a sample configuration that can be included in the deployment.yaml to enable other languages. The configurations for all the supported languages are listed in the feature documentation[1]. 
Do we have programmable option to enable/disable supported languages(by calling REST API)? Or we need to restart server after adding supported language? As i remember swagger code gen knows classes for each language and we need to override client code gen class name only if we are not using default one. 

Thanks,
sanjeewa.  



Both 1) and 2) REST APIs are enabled with OAuth 2.0 security under "apim: subscribe" scope.

4) User Interface in the APIM Store
===========================================================================


​===========================================================================

Any feedback or suggestions are highly appreciated!

Thanks,
Viduranga.
---------------------------

--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20243%207484" value="+94712437484" target="_blank">+94712437484
Web : http://wso2.com
https://wso2.com/signature

--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/





--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : +94712437484
Web : http://wso2.com
https://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Abimaran Kugathasan
In reply to this post by Sanjeewa Malalgoda
Hi Viduranga,

For one swagger code gen library version which is used by APIM, there is a predefined number of SDKs are supported, so, it's unnecessary to keep all these client class names in the configuration file. We can keep them in code level and let users enable by providing language name only.

On Fri, Oct 20, 2017 at 9:23 AM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Tue, Oct 17, 2017 at 5:54 PM, Viduranga Gunarathne <[hidden email]> wrote:
Hi,

API Manager 3.0.0 supports generating SDKs for published APIs in the API store so that it can provide native language libraries for developers to access and utilize APIs without the hassle of coding the client side implementations by themselves. 
This feature allows the clients to download SDKs from a wide variety of languages which suit their requirements and the generated SDKs contain their own documentation that can guide the users on how to use them. 

The user documentation[1] for the feature in API Manager 3.0.0 is shared in this mail and please find it in the attachments.

The implementation of the feature is as follows:

1) REST API to retrieve list of supported languages
A REST API has been implemented to retrieve a list of supported languages for the SDK generation.
This allows the front end UI to depict the list of languages that are currently configured for SDK generation. In this sample only 3 (Java, Python, Android) are configured but other languages can be added by changing a configuration file (Section 3).
===========================================================================
===========================================================================
2) REST API to generate SDKs
The second REST API is to generate an SDK for a specific API for a particular language. This allows the user to request an SDK for an API for a language of his/her choice and in return will get to download a zip file containing the SDK. This feature is supported by the swagger-codegen[2] and it supports 41 languages for client stub generation. Swagger codegen uses the OpenAPI specification (swagger definition) of the API to generate the SDK.
===========================================================================

===========================================================================
3) Supported language configurations
By default API Manager Store only allows 3 languages (Java, Python, Android) to generate SDKs. The default configurations are loaded by a bean unless over-ridden by a user specified configuration in the "deployment.yaml". More languages can be added based on the user requirements by a simple edit to the deployment.yaml. The front-end and back-end both utilize the same configuration to show the user the list of languages and to generate the SDK respectively.
===========================================================================

===========================================================================

Below is a sample configuration that can be included in the deployment.yaml to enable other languages. The configurations for all the supported languages are listed in the feature documentation[1]. 
Do we have programmable option to enable/disable supported languages(by calling REST API)? Or we need to restart server after adding supported language? As i remember swagger code gen knows classes for each language and we need to override client code gen class name only if we are not using default one. 

Thanks,
sanjeewa.  



Both 1) and 2) REST APIs are enabled with OAuth 2.0 security under "apim: subscribe" scope.

4) User Interface in the APIM Store
===========================================================================


​===========================================================================

Any feedback or suggestions are highly appreciated!

Thanks,
Viduranga.
---------------------------

--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20243%207484" value="+94712437484" target="_blank">+94712437484
Web : http://wso2.com
https://wso2.com/signature

--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : +94 773922820

    


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Chamin Dias
Hi Abimaran,

IMHO it is better to use full class name because if there is a need to introduce custom implementations, we can have a consistency for specifying class names (rather than specifying part of the name for default classes and full name for custom classes). Also we noted that if we provide part of the class name, there are some issues after OSGIfying. (Cannot evaluate org.eclipse.osgi.internal.loader.sources.NullPackageSource.toString())

Thanks.

On Fri, Oct 20, 2017 at 11:01 AM, Abimaran Kugathasan <[hidden email]> wrote:
Hi Viduranga,

For one swagger code gen library version which is used by APIM, there is a predefined number of SDKs are supported, so, it's unnecessary to keep all these client class names in the configuration file. We can keep them in code level and let users enable by providing language name only.

On Fri, Oct 20, 2017 at 9:23 AM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Tue, Oct 17, 2017 at 5:54 PM, Viduranga Gunarathne <[hidden email]> wrote:
Hi,

API Manager 3.0.0 supports generating SDKs for published APIs in the API store so that it can provide native language libraries for developers to access and utilize APIs without the hassle of coding the client side implementations by themselves. 
This feature allows the clients to download SDKs from a wide variety of languages which suit their requirements and the generated SDKs contain their own documentation that can guide the users on how to use them. 

The user documentation[1] for the feature in API Manager 3.0.0 is shared in this mail and please find it in the attachments.

The implementation of the feature is as follows:

1) REST API to retrieve list of supported languages
A REST API has been implemented to retrieve a list of supported languages for the SDK generation.
This allows the front end UI to depict the list of languages that are currently configured for SDK generation. In this sample only 3 (Java, Python, Android) are configured but other languages can be added by changing a configuration file (Section 3).
===========================================================================
===========================================================================
2) REST API to generate SDKs
The second REST API is to generate an SDK for a specific API for a particular language. This allows the user to request an SDK for an API for a language of his/her choice and in return will get to download a zip file containing the SDK. This feature is supported by the swagger-codegen[2] and it supports 41 languages for client stub generation. Swagger codegen uses the OpenAPI specification (swagger definition) of the API to generate the SDK.
===========================================================================

===========================================================================
3) Supported language configurations
By default API Manager Store only allows 3 languages (Java, Python, Android) to generate SDKs. The default configurations are loaded by a bean unless over-ridden by a user specified configuration in the "deployment.yaml". More languages can be added based on the user requirements by a simple edit to the deployment.yaml. The front-end and back-end both utilize the same configuration to show the user the list of languages and to generate the SDK respectively.
===========================================================================

===========================================================================

Below is a sample configuration that can be included in the deployment.yaml to enable other languages. The configurations for all the supported languages are listed in the feature documentation[1]. 
Do we have programmable option to enable/disable supported languages(by calling REST API)? Or we need to restart server after adding supported language? As i remember swagger code gen knows classes for each language and we need to override client code gen class name only if we are not using default one. 

Thanks,
sanjeewa.  



Both 1) and 2) REST APIs are enabled with OAuth 2.0 security under "apim: subscribe" scope.

4) User Interface in the APIM Store
===========================================================================


​===========================================================================

Any feedback or suggestions are highly appreciated!

Thanks,
Viduranga.
---------------------------

--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20243%207484" value="+94712437484" target="_blank">+94712437484
Web : http://wso2.com
https://wso2.com/signature

--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : <a href="tel:+94%2077%20392%202820" value="+94773922820" target="_blank">+94 773922820

    




--
Chamin Dias
Mobile : 0716097455


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Abimaran Kugathasan
Hi Chamin,


On Fri, Oct 20, 2017 at 3:49 PM, Chamin Dias <[hidden email]> wrote:
Hi Abimaran,

IMHO it is better to use full class name because if there is a need to introduce custom implementations, we can have a consistency for specifying class names (rather than specifying part of the name for default classes and full name for custom classes). Also we noted that if we provide part of the class name, there are some issues after OSGIfying. (Cannot evaluate org.eclipse.osgi.internal.loader.sources.NullPackageSource.toString())

Yes, If you can write a custom client class, then it's usefull. But until 2.1, we don't think about it. Also, in 2.1, we don't have any OSGI issues, and we used only langage name in the api-manager.xml file. 

Anyway, we can add all the client class name and disabled by default, so that, consumers won't get any issues in providing correct class name.
 

Thanks.

On Fri, Oct 20, 2017 at 11:01 AM, Abimaran Kugathasan <[hidden email]> wrote:
Hi Viduranga,

For one swagger code gen library version which is used by APIM, there is a predefined number of SDKs are supported, so, it's unnecessary to keep all these client class names in the configuration file. We can keep them in code level and let users enable by providing language name only.

On Fri, Oct 20, 2017 at 9:23 AM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Tue, Oct 17, 2017 at 5:54 PM, Viduranga Gunarathne <[hidden email]> wrote:
Hi,

API Manager 3.0.0 supports generating SDKs for published APIs in the API store so that it can provide native language libraries for developers to access and utilize APIs without the hassle of coding the client side implementations by themselves. 
This feature allows the clients to download SDKs from a wide variety of languages which suit their requirements and the generated SDKs contain their own documentation that can guide the users on how to use them. 

The user documentation[1] for the feature in API Manager 3.0.0 is shared in this mail and please find it in the attachments.

The implementation of the feature is as follows:

1) REST API to retrieve list of supported languages
A REST API has been implemented to retrieve a list of supported languages for the SDK generation.
This allows the front end UI to depict the list of languages that are currently configured for SDK generation. In this sample only 3 (Java, Python, Android) are configured but other languages can be added by changing a configuration file (Section 3).
===========================================================================
===========================================================================
2) REST API to generate SDKs
The second REST API is to generate an SDK for a specific API for a particular language. This allows the user to request an SDK for an API for a language of his/her choice and in return will get to download a zip file containing the SDK. This feature is supported by the swagger-codegen[2] and it supports 41 languages for client stub generation. Swagger codegen uses the OpenAPI specification (swagger definition) of the API to generate the SDK.
===========================================================================

===========================================================================
3) Supported language configurations
By default API Manager Store only allows 3 languages (Java, Python, Android) to generate SDKs. The default configurations are loaded by a bean unless over-ridden by a user specified configuration in the "deployment.yaml". More languages can be added based on the user requirements by a simple edit to the deployment.yaml. The front-end and back-end both utilize the same configuration to show the user the list of languages and to generate the SDK respectively.
===========================================================================

===========================================================================

Below is a sample configuration that can be included in the deployment.yaml to enable other languages. The configurations for all the supported languages are listed in the feature documentation[1]. 
Do we have programmable option to enable/disable supported languages(by calling REST API)? Or we need to restart server after adding supported language? As i remember swagger code gen knows classes for each language and we need to override client code gen class name only if we are not using default one. 

Thanks,
sanjeewa.  



Both 1) and 2) REST APIs are enabled with OAuth 2.0 security under "apim: subscribe" scope.

4) User Interface in the APIM Store
===========================================================================


​===========================================================================

Any feedback or suggestions are highly appreciated!

Thanks,
Viduranga.
---------------------------

--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20243%207484" value="+94712437484" target="_blank">+94712437484
Web : http://wso2.com
https://wso2.com/signature

--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : <a href="tel:+94%2077%20392%202820" value="+94773922820" target="_blank">+94 773922820

    




--
Chamin Dias
Mobile : 0716097455




--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : +94 773922820

    


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Viduranga Gunarathne
Hi all,

The complete SDK generation feature with the UI has been released with the API-M 3.0.0-M8 release. Please find the documentation relevant to this feature under "Working with SDKs" in API-M 3.0.0 docs. The REST API for this feature was released in the M7 release. However, the M8 release features the graphical user interface.

Thanks,
Viduranga.

On Fri, Oct 20, 2017 at 5:29 PM, Abimaran Kugathasan <[hidden email]> wrote:
Hi Chamin,


On Fri, Oct 20, 2017 at 3:49 PM, Chamin Dias <[hidden email]> wrote:
Hi Abimaran,

IMHO it is better to use full class name because if there is a need to introduce custom implementations, we can have a consistency for specifying class names (rather than specifying part of the name for default classes and full name for custom classes). Also we noted that if we provide part of the class name, there are some issues after OSGIfying. (Cannot evaluate org.eclipse.osgi.internal.loader.sources.NullPackageSource.toString())

Yes, If you can write a custom client class, then it's usefull. But until 2.1, we don't think about it. Also, in 2.1, we don't have any OSGI issues, and we used only langage name in the api-manager.xml file. 

Anyway, we can add all the client class name and disabled by default, so that, consumers won't get any issues in providing correct class name.
 

Thanks.

On Fri, Oct 20, 2017 at 11:01 AM, Abimaran Kugathasan <[hidden email]> wrote:
Hi Viduranga,

For one swagger code gen library version which is used by APIM, there is a predefined number of SDKs are supported, so, it's unnecessary to keep all these client class names in the configuration file. We can keep them in code level and let users enable by providing language name only.

On Fri, Oct 20, 2017 at 9:23 AM, Sanjeewa Malalgoda <[hidden email]> wrote:


On Tue, Oct 17, 2017 at 5:54 PM, Viduranga Gunarathne <[hidden email]> wrote:
Hi,

API Manager 3.0.0 supports generating SDKs for published APIs in the API store so that it can provide native language libraries for developers to access and utilize APIs without the hassle of coding the client side implementations by themselves. 
This feature allows the clients to download SDKs from a wide variety of languages which suit their requirements and the generated SDKs contain their own documentation that can guide the users on how to use them. 

The user documentation[1] for the feature in API Manager 3.0.0 is shared in this mail and please find it in the attachments.

The implementation of the feature is as follows:

1) REST API to retrieve list of supported languages
A REST API has been implemented to retrieve a list of supported languages for the SDK generation.
This allows the front end UI to depict the list of languages that are currently configured for SDK generation. In this sample only 3 (Java, Python, Android) are configured but other languages can be added by changing a configuration file (Section 3).
===========================================================================
===========================================================================
2) REST API to generate SDKs
The second REST API is to generate an SDK for a specific API for a particular language. This allows the user to request an SDK for an API for a language of his/her choice and in return will get to download a zip file containing the SDK. This feature is supported by the swagger-codegen[2] and it supports 41 languages for client stub generation. Swagger codegen uses the OpenAPI specification (swagger definition) of the API to generate the SDK.
===========================================================================

===========================================================================
3) Supported language configurations
By default API Manager Store only allows 3 languages (Java, Python, Android) to generate SDKs. The default configurations are loaded by a bean unless over-ridden by a user specified configuration in the "deployment.yaml". More languages can be added based on the user requirements by a simple edit to the deployment.yaml. The front-end and back-end both utilize the same configuration to show the user the list of languages and to generate the SDK respectively.
===========================================================================

===========================================================================

Below is a sample configuration that can be included in the deployment.yaml to enable other languages. The configurations for all the supported languages are listed in the feature documentation[1]. 
Do we have programmable option to enable/disable supported languages(by calling REST API)? Or we need to restart server after adding supported language? As i remember swagger code gen knows classes for each language and we need to override client code gen class name only if we are not using default one. 

Thanks,
sanjeewa.  



Both 1) and 2) REST APIs are enabled with OAuth 2.0 security under "apim: subscribe" scope.

4) User Interface in the APIM Store
===========================================================================


​===========================================================================

Any feedback or suggestions are highly appreciated!

Thanks,
Viduranga.
---------------------------

--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : <a href="tel:+94%2071%20243%207484" value="+94712437484" target="_blank">+94712437484
Web : http://wso2.com
https://wso2.com/signature

--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--

Sanjeewa Malalgoda
WSO2 Inc.
Mobile : <a href="tel:+94%2071%20306%208779" value="+94713068779" target="_blank">+94713068779

blog :http://sanjeewamalalgoda.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "WSO2 Engineering Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/a/wso2.com/d/optout.



--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : <a href="tel:+94%2077%20392%202820" value="+94773922820" target="_blank">+94 773922820

    




--
Chamin Dias
Mobile : 0716097455




--
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Mobile : <a href="tel:+94%2077%20392%202820" value="+94773922820" target="_blank">+94 773922820

    




--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : +94712437484
Web : http://wso2.com
https://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Youcef HILEM
Hi all,

How I can select alibrary (okhttp-gson, retrofit2, volley ) for Android
target ?

See :
https://github.com/swagger-api/swagger-codegen/wiki/FAQ#how-can-i-generate-an-android-sdk

Thanks,
Youcef HILEM



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Architecture-f62919.html
_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Viduranga Gunarathne
Hi Youcef,

Setting the library parameter is not possible with the current implementation. A git issue[1] is created for this and will look into adding this feature.

Thanks,
Viduranga.


On Mon, Dec 4, 2017 at 12:29 PM, Youcef HILEM <[hidden email]> wrote:
Hi all,

How I can select alibrary (okhttp-gson, retrofit2, volley ) for Android
target ?

See :
https://github.com/swagger-api/swagger-codegen/wiki/FAQ#how-can-i-generate-an-android-sdk

Thanks,
Youcef HILEM



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Architecture-f62919.html
_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture



--
Regards,
Viduranga Gunarathne
Software Engineer Intern
WSO2

Email : [hidden email]
Mobile : +94712437484
Web : http://wso2.com
https://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [APIM] Generating SDKs for APIs in API Manager Store

Youcef HILEM
Hi Viduranga,

Thank you very much for your response.
In this case, I have to wait for the issue to be fixed.
In the meantime, I will use maven or graddle for code generation.

Thanks
Youcef HILEM



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Architecture-f62919.html
_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture