swagger-api / swagger-api/swagger-codegen

cli jar not respecting `.swagger-codegen-ignore`?

Open
#9,335 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

I am running the 2.2.1 version of the cli jar with the following .swagger-codegen-ignore:

/*
/*/
!/swagger_client/

I want to generate only the swagger_client directory and nothing else, this is motivated from this SO post

But when i run java -jar swagger-codegen-cli-2.2.1.jar generate -i <spec> -l python it creates the directories test and swagger_client and then does not write anything in them (says Skipped generation due to rule in swagger-codegen-ignore. What should the ignore file look like?

Swagger-codegen version

2.2.1

Swagger declaration file content or url
Command line used for generation

java -jar swagger-codegen-cli-2.2.1.jar generate -i -l python

Steps to reproduce

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 the supplied .swagger-codegen-ignore patterns and reproduce the issue using the swagger-codegen-cli generate command with the Python generator. Trace how the CLI applies ignore rules during generation and verify the result against the requested outcome: only swagger_client should be generated, without test or other generated content.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.