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

XmlRootElement with duplicate names only one will be modelled. #3568

Closed
Solverj opened this issue May 26, 2020 · 3 comments
Closed

XmlRootElement with duplicate names only one will be modelled. #3568

Solverj opened this issue May 26, 2020 · 3 comments

Comments

@Solverj
Copy link

Solverj commented May 26, 2020

If I have these two java classes:

@XmlRootElement(name = "Result")
class ApiResult {
  // some content A
}

@XmlRootElement
class SomeOtherClass {
 // Some content B
  static class Result {
     // some content C
  }
}

Then when swagger is modelling it will "pick" one of the two "A" or "C" and if that's "A" that will be the content of the modelling of "SomeOtherClass.Result" i.e., "C" will show "A" or vica verca. Can this be fixed by having conflicts like this instead use fully qualified names, i.e., package mapping?

@Solverj
Copy link
Author

Solverj commented May 29, 2020

Ping pong, anyone?

@perluqing
Copy link

I have the same issues

@frantuma
Copy link
Member

this seems to duplicate #2861, please see comment there and PR #3542
Closing as duplicate.

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

3 participants