swagger-api / swagger-api/swagger-codegen
swagger-codegen should not generate [main] WARN io.swagger.codegen.DefaultCodegen - Empty operationId found for path: <path>. Renamed to auto-generated operationId: <opId>
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
swagger-codegen should not generate [main] WARN io.swagger.codegen.DefaultCodegen - Empty operationId found for path: . Renamed to auto-generated operationId:
I think the openapi 2.0 spec says the operationId is optional, therefore I'd expect such warnings to be emitted only if '--warn-missing-operationId' or similar was supplied.
Swagger-codegen version
current master; HEAD = 1c160df33897898da1c39f230c737eb6a313e6ba
Swagger declaration file content or url
any swagger with omitted operationId I suppose
Command line used for generation
JAR=".../swagger-codegen.git/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
java -jar "${JAR}" generate -i ~/sscce.yaml -l html -o foo
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 at io.swagger.codegen.DefaultCodegen, where the warning is emitted during the generate CLI path shown. Check how omitted operationId values are handled and use a Swagger/OpenAPI input without operationId to verify the default behavior and the requested opt-in warning behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 31/100