swagger-api / swagger-api/swagger-codegen
NPE at ModelImpl
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hi
I currently facing this stack trace
java.lang.RuntimeException: Could not process operation:
Tag: AssetGroups
Operation: addAssets
Resource: put /api/v2/assetGroups/{id}/assetList
Definitions: {Addresses=io.swagger.models.ModelImpl@9901aa0,
AppHost=io.swagger.models.ModelImpl@8456d641, ....
Exception: null
at io.swagger.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:861)
at io.swagger.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:763)
at io.swagger.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:388)
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:700)
after upgrading from swagger-codegen-maven-plugin 2.2.2 to 2.2.3 where I generate java source from swagger spec
Need suggestion on how to look for abnormalities in my swagger spec file which can cause this issue ( or this can just be regression )
Thanks
Swagger-codegen version
2.2.3
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 with DefaultGenerator.java at processOperation, processPaths, and generateApis, then compare behavior between swagger-codegen 2.2.2 and 2.2.3 using the reported AssetGroups/addAssets operation. Inspect the Swagger definitions and operation details for the condition that produces the null exception; done means identifying a reproducible spec or regression and documenting the finding or a focused fix path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100