Itzhak Eretz Kdosha
Itzhak Eretz Kdosha

Reputation: 543

How to skip generation of ".openapi-generator" folder when using openapi-generator?

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:

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?

Upvotes: 4

Views: 7405

Answers (1)

Itzhak Eretz Kdosha
Itzhak Eretz Kdosha

Reputation: 543

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.

Upvotes: 4

Related Questions