OpenAPITools / OpenAPITools/openapi-generator
[BUG][KOTLIN] Generator printing warnings for type-mapped class
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
I'm trying to generate Kotlin code using a mapped type Feature that I want to provide. The generated code looks correct, but the plugin prints a warning line:
Unknown type found in the schema: Feature
Am I configuring something incorrectly and that line can go away?
I have a minimal example at https://github.com/andrewparmet/test-openapi-kotlin-type-mapping.
My config, in particular for type mappings:
https://github.com/andrewparmet/test-openapi-kotlin-type-mapping/blob/master/build.gradle.kts#L17-L18
In fact, I can remove those two lines altogether or include one or the other and nothing changes. My impression from the documentation is that I want them and they should be responsible for this warning. Is there something I'm missing?
openapi-generator version
4.3.1
OpenAPI declaration file content or url
Generation Details
Gradle plugin.
Steps to reproduce
./gradlew build in the directory of the attached project.
Suggest a fix
I can ignore this warning since the generated code is correct, but I want to see if it can be removed.
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
Reproduce the warning with ./gradlew build in the linked minimal project. Inspect build.gradle.kts lines 17-18 and src/main/resources/test-api.yaml, then trace how the Kotlin generator handles the mapped Feature type; done means the warning is removed while generated code remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100