OpenAPI generated ApiClient has no xml serializer/deserializer

37 Views Asked by At

Using the openapi generator plugin I'm trying to generate a java client, but the generated ApiClient does not handle (serialize/deserialize) application/xml content type. What do I need to add to my configuration to resolve the problem?

The generator config:

<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.3.0</version>
<executions>
    <execution>
        <phase>generate-sources</phase>
        <goals>
            <goal>generate</goal>
        </goals>
        <configuration>
            <inputSpec>${project.basedir}/src/main/resources/client_descriptor.yaml</inputSpec>
            <generatorName>java</generatorName>
            <configOptions>
                <apiPackage>package.name.client.api</apiPackage>
                <modelPackage>package.name.client.model</modelPackage>
                <packageName>package.name.client</packageName>
                <withXml>true</withXml>
                <useJakartaEe>true</useJakartaEe>
                <hideGenerationTimestamp>true</hideGenerationTimestamp>
            </configOptions>
            <library>apache-httpclient</library>
        </configuration>
    </execution>
</executions>
<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
    </dependency>
</dependencies>
0

There are 0 best solutions below