OpenAPITools / OpenAPITools/openapi-generator

[BUG] Spurious changes in `./bin/generate-samples.sh` output on Windows

Open
#9,400 1 comment 0 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

Bug Report Checklist
  • [ X ] Have you provided a full/minimal spec to reproduce the issue?
  • [ N/A ] Have you validated the input using an OpenAPI validator (example)?
  • [ X ] Have you tested with the latest master to confirm the issue still exists?
  • [ X ] Have you searched for related issues/PRs?
  • [ X ] What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

running the steps required as part of the PR template generates a bunch of junk on Windows, including:

  • filepath / vs \
  • alphabetically ordered files - / before vs after letters
  • /r/n vs /n
openapi-generator version

master branch

Generation Details

running the steps required as part of the PR template

Steps to reproduce
  1. Open git-bash on Windows
  2. git checkout master && git reset --hard && git clean -fdx to make sure you don't have any junk in your local repo
  3. ./mvnw clean package
  4. ./bin/generate-samples.sh to generate the samples
  5. git diff to see the unwanted changes.

Expected output: nothing in the diff
Actual output: very long, containing a lot of spurious changes. See attached
tmp.txt

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 with bin/generate-samples.sh and the Windows Git Bash reproduction steps, including ./mvnw clean package. Compare the generated samples with git diff and inspect the reported path separator, file ordering, and line-ending changes. Done means the documented generation steps produce no diff on Windows.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.