I read the following here:
Swagger does not currently include a suggestion for supporting multiple API versions from a client or server point of view—versioning information (both of the spec and the underlying API implementation) are declared.
What I wish to know is that how to configure swagger UI to show the API for multiple services, i.e. services residing on different servers. I tried working with configuring the swagger UI on a different server but I get the following error:
Can't read from server. It may not have the appropriate access-control-origin settings.
I have read about enabling CORS on the server but that did not help in my case as the services run on liberty profile.
Swagger UI is configured on a locally running liberty profile of WAS and the services run on a different WAS instance.
The direction I am moving is to have UI for multiple services, but this I thought is a logical starting point.
It seems that Swagger 2 specs will allow this soon. Look at this response from someone who seems to be a contributor:
We're currently in the process of finalizing the ability to collate several micro-services into a single collection, but eventually, each micro-service is still going to be a single file.
https://stackoverflow.com/a/26917653/3389881
Same person comments in the Swagger Google group: https://groups.google.com/forum/#!topic/swagger-swaggersocket/H7dsSd6VPvM
This person has found a way to group multiple Swagger 2 definitions in the same place: http://utility-stack.apievangelist.com/index.html
Finally, it seems that Swagger 1 would support multiple API basepaths.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With