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

Question: produces Application/XML <!-- XML example cannot be generated; root element name is undefined --> with not annotated classes #719

Closed
Sslimon opened this issue Jun 8, 2020 · 1 comment

Comments

@Sslimon
Copy link

Sslimon commented Jun 8, 2020

Hi all

I hope it's fine to ask here a question.

I have a Spring Boot Rest Api and I want to have the swagger documentation. Mostly the Api produces application/xml. When the return class is annotated with XmlRootElement and the properties have the XmlElement attributes everything is working fine. But if a primitive type or a List is returned, the root element is missing. Is it somehow possible to tell springdoc he should use jaxb to generate all this information/names. So that the xml has the root name and everything which then really gets returned?

Thank you very much and best
Simon

@bnasslahsen
Copy link
Collaborator

bnasslahsen commented Jun 8, 2020

@Sslimon,

The springdoc-openapi, generates the OpenAPI description. But is based on swagger-core and swagger-ui libraries.

This is an existing issue in the swagger-ui where you cas add you comment:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants