swagger-api / swagger-api/swagger-codegen

skipIfSpecIsUnchanged: true not working across operation systems

Open
#12,460 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

hi we are experiencing issue, the "skipIfSpecIsUnchanged: true" is not working for developers who are using windows system. The codegen always regenerates source code even there is no change under openapi.yml.
However the config is working fine for MacOS developers.

Swagger-codegen version

7.6.0

Swagger declaration file content or url
        <plugin>
            <groupId>org.openapitools</groupId>
            <artifactId>openapi-generator-maven-plugin</artifactId>
            <version>7.6.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <inputSpec>${project.basedir}/src/main/resources/api.yaml</inputSpec>
                        <templateDirectory>
                            ${project.basedir}/src/main/resources/openapi/templates
                        </templateDirectory>
                        <skipIfSpecIsUnchanged>true</skipIfSpecIsUnchanged>
                        <generatorName>spring</generatorName>
                        <configOptions>
                            <delegatePattern>true</delegatePattern>
                            <useSpringBoot3>true</useSpringBoot3>
                            <!--<useBeanValidation>true</useBeanValidation>
                            <performBeanValidation>true</performBeanValidation>-->
                        </configOptions>
                        <generateSupportingFiles>true</generateSupportingFiles>
                        <supportingFilesToGenerate>
                            ApiUtil.java
                        </supportingFilesToGenerate>
                    </configuration>
                </execution>
            </executions>
        </plugin>
Command line used for generation

mvn verify install

Suspecting if the is difference on file encoding and end of line sequence between windows and mac. and also some effect on the sha256 files under .openapi-generators folder?

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

Start by reproducing the Maven verify install command with the shown openapi.yml configuration on Windows and macOS. Compare the .openapi-generators SHA-256 files and file encoding or line-ending behavior; done means skipIfSpecIsUnchanged: true skips generation consistently when the specification is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi, spring
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.