swagger-api / swagger-api/swagger-codegen
Failed to load class "org.slf4j.impl.StaticLoggerBinder exception when using 3.0.0 branch
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 using Windows 11 with jdk-11.0.4. I am trying to generate SDK project for my ASP.Net Core application using OpenAPI3.0.
I am following the steps mentioned in this GitHub repo's read me. But ended up with the below exception.
PS D:\OpenAPI\v3.0.43_codegen\swagger-codegen-3.0.43\swagger-codegen-3.0.43> java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i D:\petstore.json -l php -o c:\temp\petstore_local_api_client
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation.
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Swagger-codegen version
- swagger-codegen-3.0.43
- apache-maven-3.8.8-bin
Swagger declaration file content or url
Pet store same comes by default.
Command line used for generation
PS D:\OpenAPI\v3.0.43_codegen\swagger-codegen-3.0.43\swagger-codegen-3.0.43> java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i D:\petstore.json -l php -o c:\temp\petstore_local_api_client
Steps to reproduce
PS D:\OpenAPI\v3.0.43_codegen\swagger-codegen-3.0.43\swagger-codegen-3.0.43> java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i D:\petstore.json -l php -o c:\temp\petstore_local_api_client
Related issues/PRs
NA
Suggest a fix/enhancement
I tried the below.
- I have the slf4j-simple-2.0.7.jar and slf4j-api-2.0.7.jar in classpath of environment variable.
- I have the slf4j-simple-2.0.7.jar and slf4j-api-2.0.7.jar in D:\OpenAPI\v3.0.43_codegen\swagger-codegen-3.0.43\swagger-codegen-3.0.43 which is the root folder in powershell
- I have the slf4j-simple-2.0.7.jar and slf4j-api-2.0.7.jar in :\OpenAPI\v3.0.43_codegen\swagger-codegen-3.0.43\swagger-codegen-3.0.43\ modules\swagger-codegen-cli\target\ where the swagger-codegen-cli.jar is available.
Note
There is no exception when I try with master source or2.x.x source of CodeGen. This issue is raised when I am trying to use CodeGen 3.X.X version of source. Since I am trying to adapt OpenAPI spec 3.0 can someone help me with this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported Windows command with swagger-codegen-cli-3.0.43 and inspect the modules/swagger-codegen-cli/target packaging and its SLF4J dependencies. Compare the 3.0.0 branch with master or 2.x.x, then verify whether the CLI should package a compatible logger binding or document the warning and its effect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, php
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100