Issue while trying to create swagger spec in apigen spec tool for xml object

Not applicable

Hi @Anil Sagar,

We are trying to add XML schema definitions to swagger spec. What we observed is that if we hit a proxy in apispec gen tool and try to create a spec, it does not create the xml schema definition in the swagger. We have to tweak the swagger manually in order to add the definitions. Is there any way that this can be achieved in apispec gen? Can you please suggest if there are any options/work-arounds. Please let me know if you need more details.

Regards,

Shwetha

Solved Solved
0 5 185
1 ACCEPTED SOLUTION

@Shwetha R Yermal , OpenSource tool api2swagger doesn't support XML at this point of time. Specgen is built on top of above tool. Feel free submit a pull request to the opensource tool here. If you are interested take a look at code in above github repo & feel free to submit a patch with new feature.

PS: Above tools are not officially supported by Apigee, They are open source & labs project.

View solution in original post

5 REPLIES 5

@Shwetha R Yermal , OpenSource tool api2swagger doesn't support XML at this point of time. Specgen is built on top of above tool. Feel free submit a pull request to the opensource tool here. If you are interested take a look at code in above github repo & feel free to submit a patch with new feature.

PS: Above tools are not officially supported by Apigee, They are open source & labs project.

Hi @Anil Sagar,

We have come up with a code for the above by making changes to api.js.Is it possible to test it by including it in github? Else, please suggest an option where we can test the code.

Regards,

Pranjali

@Pranjali , Sorry, I am not getting what you are saying. What exactly is the question here ? Can you please add more details ?

Hi @Anil Sagar ,

The source code of api2swagger which you have provided, we did some changes to the code in order to make it work for xml payloads (added a patch). But I am not sure how can we test it.

Can you please provide some inputs on it.

Regards,

Pranjali

@Pranjali , You can run api2swagger tool on your local machine. Just make an API call which takes XML or responds with XML using ap2swagger tool with your patch & test it out. You should be able to test on your local machine.