I am having trouble converting xml (WSDL) to swagger 2.0 specs in golang. i found a library on github that converts xml to normal json but i need to convert to swagger 2.0 json. suggest me libraries if any. Thanks in advance!
I suggest you take a look at these libraries: https://github.com/go-openapi. I use them and they allow you to do pretty much everything you need.
You can use them to build the swagger 2.0 spec dynamically. But of course, you will need to write your custom code to parse your XML, convert it to swagger structures and after all, you will be able to write your dynamically created spec to the file in json
or yaml
format.
I solved it by using API transformer (https://apimatic.io) It is providing APU for conversion between all different API specs. Hope this helps.