Skip to content

withXml true is not generating the java classes with xmlelement annotations #8902

@selva-krishnan

Description

@selva-krishnan
Description

The codegen plugin withXml true is not generating the java classes with @xmlelement. It works with swagger-codegen plugin though.

openapi-generator version

5.0.1

OpenAPI declaration file content or url

You can test it with sample Pet store swagger from - https://editor.swagger.io/

Command line used for generation

mvn clean compile

Steps to reproduce

Download the sample YAML from the PetStore example and generate the classes using generatorName - java and withXml - true. The classes are missing the xmlelement annotation. But when the same config is used with swagger-codegen-maven plugin version 3.0.25, It generated the classes and adds xmlelement annotation to the fields.

Related issues/PRs

N/A

Suggest a fix/enhancement

Compare the swagger codegen plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions