Hi All,

According to the proposed C5 architecture, we are using frontend java
script based implementation to invoke relevant swagger APIs and render APIM
webapps (Publisher, Store etc). In that case, we have to use a java script
based swagger client in APIM Store, Publisher UUF apps.

Following are the options we have.

*1. Using Swagger Javascript library [1]*

Using this, we can dynamically generate swagger client based on the given
swagger definition (This does not require any static code generation). In
current C5 implementations, we are using Swagger-js library based client to
invoke backend APIs to render store/publisher UI. It is given that, this
has been thoroughly tested with mocha and this is the fastest way to enable
communication with backend swagger server.

*2. Using Swagger Code Generator to generate Javascript Swagger client [2]*

In this approach, we have to generate a static swagger client for each
swagger definitions in Publisher, Store, Admin apps and maintain that
particular client in the code base. The existing java script code
generator[3] supports for nodejs and angularjs, so that its difficult to
embed that particular client with UUF based webapps. In that case, we might
need to come up with a plain java script supported swagger client generator
and maintain it.

What would be the best way to achieve this?
Is it recommended to use 3rd part swagger-js client within APIM code base?
If not, is it beneficial to invest some effort in implementing swagger code
generator?
Are there any other better ways of achieving this?

Your recommendations and suggestions are highly appreciated.

[1] - https://github.com/swagger-api/swagger-js
[2] - https://github.com/swagger-api/swagger-codegen
[3] - https://github.com/wcandillon/swagger-js-codegen
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to