OpenAPITools / OpenAPITools/openapi-generator
[BUG] ModelUtils uses wrong variable to log inheritance problem
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
A wrong variable are being used to log, then a null value are written in the console:
DEBUG [2019-12-04 12:00:11,720] [main] Not a parent since discriminator.propertyName is not set null
WARN [2019-12-04 12:04:01,883] [main] [deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for null
This way it is impossible to identify which schema is not fulfilling the inheritance requirements.
openapi-generator version
4.2.3-SNAPSHOT
Suggest a fix
ModelUtils line 930 and 944.
There are a dependency of this error with the inheritance being treated with this: https://github.com/OpenAPITools/openapi-generator/pull/4454
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 in ModelUtils around lines 930 and 944, comparing the variable used in each inheritance-related log message with the schema being processed. Confirm that the messages identify the affected schema instead of logging null, then verify the relevant logging behavior against the inheritance handling described in pull request #4454.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100