What will be best approach for aggregating rest api from various end points?

143 views
Skip to first unread message

Frank He

unread,
Mar 23, 2015, 6:23:41 PM3/23/15
to swagger-sw...@googlegroups.com
We have several micro services and each one is providing rest api, we now need to have an unique documentation which can display all the apis. We do not want user to jump between different urls in order to see that urls, so I plan to build a swagger server which is aggregating apis and provide that master api-docs to swagger ui.
May I ask what will be the best solution for this purpose?
I am using spring framework as backend, so I prefer to use swagger-springmvc

amjohn...@gmail.com

unread,
Mar 25, 2015, 12:25:32 AM3/25/15
to swagger-sw...@googlegroups.com
Am also looking for the same. I was using swagger-core and swagger-ui with apache cxf rest services. Could anybody let us know what is the approach?

Frank He

unread,
Mar 25, 2015, 1:49:36 AM3/25/15
to swagger-sw...@googlegroups.com
I am thinking just put all different end point into /api-docs and then let swagger automatically retrieve api details from different endpoint. Just make cors available through different domains.

On Tue, Mar 24, 2015 at 9:25 PM, <amjohn...@gmail.com> wrote:
Am also looking for the same. I was using swagger-core and swagger-ui with apache cxf rest services. Could anybody let us know what is the approach?

--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/voS-Q0su44A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

amjohn...@gmail.com

unread,
Mar 25, 2015, 1:52:10 AM3/25/15
to swagger-sw...@googlegroups.com

mailtonag

unread,
Mar 25, 2015, 10:41:21 AM3/25/15
to swagger-sw...@googlegroups.com
Frank,
did u implement the mentioned approach on any unix/linux environment with cors? i am just looking what kind of CORS proxy can be used for Linux? I have implemented the same a month ago in my local desktop and it worked fine with multiple end point services but now i am looking for full deployment in Linux environment and looking for options on which cors proxy can be used?


On Wednesday, March 25, 2015 at 12:49:36 AM UTC-5, Frank He wrote:
I am thinking just put all different end point into /api-docs and then let swagger automatically retrieve api details from different endpoint. Just make cors available through different domains.
On Tue, Mar 24, 2015 at 9:25 PM, <amjohn...@gmail.com> wrote:
Am also looking for the same. I was using swagger-core and swagger-ui with apache cxf rest services. Could anybody let us know what is the approach?

--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/voS-Q0su44A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Frank He

unread,
Mar 25, 2015, 11:02:15 AM3/25/15
to swagger-sw...@googlegroups.com
I am using spring, so I just added header in the filter to allow cors, like this:
response.setHeader("Access-Control-Allow-Origin", "*");
This can be used for whatever language, nodejs/php..
what do you mean in linux environment? Is that important for what type of environment?



To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.

mailtonag

unread,
Mar 25, 2015, 12:16:24 PM3/25/15
to swagger-sw...@googlegroups.com
I am using swagger UI where i aggregated/consolidated around 50 rest services for different application end points (all these app APIS are deployed on different servers).
The swagger UI application is deployed on one server and all other application service APIs (where the UI is calling to test the data) are deployed on different servers.
in order to test the APIs from UI i need to enable CORS so thinking to install a CORS proxy to make the OPTIONS type request to POST. in my windows/local desktop i used CORS-Anywhere but looking for Linux environment.
i do not have option to ask all other applications (around 10 applications) to enable CORS/Access-Control on their application servers and thinking to install a proxy which can support CORS.
Thank you.



On Wednesday, March 25, 2015 at 10:02:15 AM UTC-5, Frank He wrote:
I am using spring, so I just added header in the filter to allow cors, like this:
response.setHeader("Access-Control-Allow-Origin", "*");
This can be used for whatever language, nodejs/php..
what do you mean in linux environment? Is that important for what type of environment?


On Wed, Mar 25, 2015 at 7:41 AM, mailtonag <mailt...@gmail.com> wrote:
Frank,
did u implement the mentioned approach on any unix/linux environment with cors? i am just looking what kind of CORS proxy can be used for Linux? I have implemented the same a month ago in my local desktop and it worked fine with multiple end point services but now i am looking for full deployment in Linux environment and looking for options on which cors proxy can be used?


On Wednesday, March 25, 2015 at 12:49:36 AM UTC-5, Frank He wrote:
I am thinking just put all different end point into /api-docs and then let swagger automatically retrieve api details from different endpoint. Just make cors available through different domains.
On Tue, Mar 24, 2015 at 9:25 PM, <amjohn...@gmail.com> wrote:
Am also looking for the same. I was using swagger-core and swagger-ui with apache cxf rest services. Could anybody let us know what is the approach?

--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/voS-Q0su44A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsubscri...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Frank He

unread,
Mar 25, 2015, 1:10:27 PM3/25/15
to swagger-sw...@googlegroups.com
That is actually what I am interested!
But I think we may have to create our own proxy server solution in what ever language, which is used to retrieve api end point json data and  then feed back to swagger UI. Then swagger UI is sending request to this proxy server, which will relay the request to final end point. I think a simple solution is to relay everything, including all params to external endpoint, and just switch URL....
I personally don't believe we have off shelf solution,having to write a swagger server to meet your requirement.
If you have found better solution, please tell me

To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages