Skip to content

@XmlElement not working correctly on Fields #502

Closed
@sohailehmad

Description

@sohailehmad

If I use @XmlElementon a Filed, it will only work if Field name is same as provided in XmlElement e.g

@XmlRootElement(name = "Pet")
public class Pet {
  @XmlElement(name = "name")
  public String name;
}

But if field name is different from the one provided in XmlElement field will not appear in api docs

@XmlRootElement(name = "Pet")
public class Pet {
  @XmlElement(name = "pet_name")
  public String name;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions