OpenAPITools / OpenAPITools/openapi-generator

[BUG] ignore file pattern **/* does not suppress generation of all files in root of output directory

Open
#16,814 0 comments 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
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The pattern **/* in .openapi-generator-ignore file should suppress all content in the root of the output directory. It does not and you need to add an additional pattern /* to get the root output directory files suppressed.

This is flagged/warned as redundant by .ignore file tooling.

openapi-generator version

7.0.1

OpenAPI declaration file content or url

.openapi-generator-ignore

**/*
Generation Details

In this case I was using the java generation.

Steps to reproduce
  1. Create an ignore file with the content mentioned above
  2. Generate an openapi spec using java defaults

Expected: No files generated at all
Actual: All files in the root directory are generated.

Related issues/PRs

None that I can see

Suggest a fix

No suggestion

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 Java generation with a .openapi-generator-ignore file containing only **/*, using the issue's expected and actual results as the baseline. Trace the ignore handling used during generation and verify that no files are produced in the output directory when the behavior is corrected.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.