4

I am not able in any way to skip openapi-generator maven plugin version 5.3.0 from generating ".openapi-generator" folder.

        <plugin>
            <groupId>org.openapitools</groupId>
            <artifactId>openapi-generator-maven-plugin</artifactId>
            <version>5.3.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <generateSupportingFiles>false</generateSupportingFiles>
                        <output>${REDACTED}</output>
                        <apiPackage>${REDACTED}</apiPackage>
                        <modelPackage>${REDACTED}</modelPackage>
                        <templateDirectory>${REDACTED}</templateDirectory>
                        <ignoreFileOverride>${PATH_TO_MY_FILE}</ignoreFileOverride>
                        <inputSpec>${REDACTED}</inputSpec>
                        <modelNameSuffix>REDACTED</modelNameSuffix>
                        <generatorName>java-vertx-web</generatorName>
                    </configuration>
                </execution>
            </executions>
        </plugin>

I have tried using ".openapi-generator-ignore" with all sorts of options including:

  • .openapi-generator/*
  • .openapi-generator/**
  • .openapi-generator/
  • and even **/*sha256 to try and ignore a single file that is there currently

I have other ignored files on my list so I know it is used.

Is there a way to prevent those meta files from being generated?

3
  • maybe share your pom.xml? Commented Feb 20, 2022 at 11:51
  • @George I have added the plugin config, thanks! Commented Mar 1, 2022 at 8:40
  • I don't know a way to suppress that, but I don't know why you would want to. It doesn't get packaged in the jar file, so you're the only one who will see it. Why do you want to suppress it? There may be a better solution to whatever your objection is. Commented Aug 1, 2024 at 23:28

1 Answer 1

6

It turns out that this file is generated at the maven-plugin level and is hard-coded to be generated.
See source code.

There is no supported way to skip it's generation currently.

A possible option is creating your own plugin copied from openapi-generator-maven-plugin and remove the unwanted files generation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.