Skip to content

[BUG] using xml:wrapped:false does not generate the correct annotation #2417

Closed
@tom-mayer

Description

@tom-mayer

Hey,

in the documentation https://swagger.io/docs/specification/data-models/representing-xml/ here it says that you can represent unwrapped lists in xml with using the xml:wrapped:false in the openapi yaml. I am using the JavaSpring generator. The xml:atttribute:[true|false] and xml:name seem to work fine, generating the correct @JacksonXmlProperty values.

However using xml:wrapped:false does not change the generated model. Jackson-Xml uses wrapping by default, so if this is set, a @JacksonXmlElementWrapper(useWrapping = false) should be rendered over the property to make xmls like that parsable.

Looking at the pojo.mustache @JacksonXmlElementWrapper is also not in there. Should be around line 27.

My question is, is this really a bug / not yet done or do I just miss something.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions