Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate OpenAPI specification models from XML examples? #1451

Closed
jnazander opened this issue Dec 28, 2017 · 4 comments
Closed

How to generate OpenAPI specification models from XML examples? #1451

jnazander opened this issue Dec 28, 2017 · 4 comments
Labels
media and encoding Issues regarding media type support and how to encode data (outside of query/path params) xml

Comments

@jnazander
Copy link

Suppose I have some API endpoints, written in PHP on server-side, that return XML data. I want to create an OpenAPI specification for them.

Now, I could go and write the entire specification by myself, but since we're developers here and not manual laborers, we should never do anything manually that could be automated.

I know that there is "Swagger Inspector" that claims to generate the specifications by taking a specific endpoint URL, but it only generates the request definition, not the response data model. I'm not sure if that's a bug or just not implemented, but this is unacceptable for me.

So, is there any tool that could generate the response data models within Swagger by taking XML data for example? I know that there are tools that convert XML to XSD, so I don't see why doing the same for XML -> Swagger definition would be a problem.

@jnazander
Copy link
Author

jnazander commented Dec 28, 2017

I found one tool that attempts to do that - https://github.com/mszostok/swagger-converter - but it seems abandoned and it's made to convert an entire WADL+XSD specification to Swagger, not just the data models. Is there anything like that?

@Bsplesk
Copy link

Bsplesk commented Aug 23, 2018

also loking for tool that allows convert "XSD object model" to "swagger definitions model".
Now I use XSLT, written by hand.

@javiqm12
Copy link

javiqm12 commented Feb 3, 2020

It would be good to have something like that.

@handrews handrews added xml media and encoding Issues regarding media type support and how to encode data (outside of query/path params) labels Jan 27, 2024
@handrews
Copy link
Member

This repository is for the spec rather than for new tools, so I'm closing this issue - we have a tools repository that maintains a list of tools you might want to check (see tools.openapis.org)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
media and encoding Issues regarding media type support and how to encode data (outside of query/path params) xml
Projects
None yet
Development

No branches or pull requests

4 participants