OpenAPITools / OpenAPITools/openapi-generator

interfaceOnly and generateModelDocumentation configs are not working as expected

Open
#2,252 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

I'm using a openapi-generator-maven-plugin with jaxrs-cxf generator and the following configuration:

    <groupId>org.openapitools</groupId>
    <artifactId>openapi-generator-maven-plugin</artifactId>
    <version>3.3.4</version>
    <executions>
      <execution>
        <goals>
          <goal>generate</goal>
        </goals>
        <configuration>
          <inputSpec>${project.basedir}/src/main/resources/openapi.yaml</inputSpec>
          <generatorName>jaxrs-cxf</generatorName>
          <generateSupportingFiles>false</generateSupportingFiles>
          <generateApiTests>false</generateApiTests>
          <generateModelDocumentation>false</generateModelDocumentation>
          <generateApiDocumentation>false</generateApiDocumentation>
          <configOptions>
            <sourceFolder>src/gen/java/main</sourceFolder>
            <interfaceOnly>true</interfaceOnly>
          </configOptions>
        </configuration>
      </execution>
    </executions>
  </plugin>

I do expect from configuration not to generate implementation classes as well as not to have annotation documentation in my models and apis, however they're still in place.
I've found other people having the same issue.
Is it a bug which hasn't been fixed or should I do smth different?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Maven configuration using the referenced src/main/resources/openapi.yaml path, generatorName jaxrs-cxf, interfaceOnly, and documentation-generation settings. Inspect the generated API and model output to determine which options are ignored; done means implementation classes and annotation documentation are omitted as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.