Details
-
Task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
It appears that the plugin camel-yaml-dsl-maven-plugin doesn't retrieve the default name of a property as the JAXB specification states.
Indeed, I have the next mapping:
@XmlElement @Metadata(label = "security") private List<SecurityDefinition> securityRequirements = new ArrayList<>();
According the JAXB specification, if a field is annotated with the annotation XmlElement, its name should be retrieved from the attribute "name" if set otherwise it should use the field name.
With the current code, I end up with "security" corresponding to the value of the attribute "name" of the annotation XmlRootElement on the class SecurityDefinition as you can see below:
@Metadata(label = "rest,security,configuration", title = "Rest Security") @XmlRootElement(name = "security") @XmlAccessorType(XmlAccessType.FIELD) public class SecurityDefinition {
According to the specification, this behavior is actually only expected with a field annotated with XmlElementRef.
Attachments
Issue Links
- Blocked
-
CAMEL-17717 REST DSL securityRequirements cleanup
- Resolved
- links to