swagger-api / swagger-api/swagger-codegen

[JAVA] WARNING message even when the maven plugin is running correctly

Open
#11,741 0 comments 7 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 use swagger-codegen-maven-plugin and the plugin displays the following WARNING message:
[WARNING] Output directory does not exist, or is inaccessible. No file (.swagger-codegen-ignore) will be evaluated.

The code suggests that this warning occurs when the directory where an ignore file could be doesn't exist.

Code location:
https://github.com/swagger-api/swagger-codegen/blob/9a490c900ecb57c708f2614441c155f506043153/modules/swagger-codegen/src/main/java/io/swagger/codegen/ignore/CodegenIgnoreProcessor.java#L48

There was the same issue for openapi-generator project : https://github.com/OpenAPITools/openapi-generator/issues/4627

The fix has been to change the log level to INFO.

Is it possible to do the same fix ?

Swagger-codegen version

3.0.33

Related issues/PRs

openapi-generator: https://github.com/OpenAPITools/openapi-generator/issues/4627

Suggest a fix/enhancement

Remove the warning entirely or make it INFO.

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 in modules/swagger-codegen/src/main/java/io/swagger/codegen/ignore/CodegenIgnoreProcessor.java at the warning referenced in the issue. Review the related ignore-file handling and verify the Maven plugin no longer presents this expected missing-output-directory condition as a warning; the requested outcome is an INFO-level message or no message.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.