Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type K (+TypeVariableImpl) is not supported yet. #138

Open
landon-L opened this issue May 8, 2024 · 6 comments
Open

Type K (+TypeVariableImpl) is not supported yet. #138

landon-L opened this issue May 8, 2024 · 6 comments

Comments

@landon-L
Copy link

landon-L commented May 8, 2024

How to display detailed logs when encountering this prompt, "Type K (+TypeVariableImpl) is not supported yet."

@kbuntrock
Copy link
Owner

Hello @landon-L .

You can use the "-X" option. Ex : mvn compile -X

May I ask which version of the plugin are you using?

@kbuntrock
Copy link
Owner

Hello @landon-L. Do you have any more information about this bug? Which version of the plugin are you using?

@avk458
Copy link

avk458 commented Sep 2, 2024

I've encountered this error using version of 0.0.20. I can't find additional information about the error, even after narrowing down to a specific RestController.

[INFO] Reflections took 1629 ms to scan 278 urls, producing 2 keys and 2 values
[INFO] Found 1 annotated classes with [ RequestMapping ]
[DEBUG] Parsing tag : ContractReportController
[DEBUG] Parsing endpoint ContractReportController
[DEBUG] Parsing request method : getContractRelate2ReportList
[DEBUG] Reading parameters from getContractRelate2ReportList
[DEBUG] Parameter : id
[DEBUG] PathVariable annotation detected (id)
[DEBUG] Parameter : query
[DEBUG] DataObject{openApiType=io.github.kbuntrock.utils.OpenApiResolvedType@54e2115e, arrayItemDataObject=null}
[DEBUG] Finished parsing endpoint : getContractRelate2ReportList - GET
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:36 min
[INFO] Finished at: 2024-09-02T17:30:48+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.github.kbuntrock:openapi-maven-plugin:0.0.20:documentation (documentation) on project ilis2: Execution documentation of goal io.github.kbuntrock:openapi-maven-plugin:0.0.20:documentation failed: Type K (+TypeVariableImpl) is not supported yet. -> [Help 1]

@avk458
Copy link

avk458 commented Sep 5, 2024

Turns out, I have a model class that extends the HashMap<String, Object>, this will resolve to OpenApiDataType.OBJECT. So that when add the dataobject to the TagLibrary, it will inspected as an object. The K TypeVariable comes from the AbstractMap.
I believe the root cause is that the static type analysis cannot handle generic types.

I'm willing to help.

@kbuntrock
Copy link
Owner

kbuntrock commented Sep 6, 2024

Hello @avk458

Thank you very much for the bug report / analysis.

It would help me if you create a PR with a test in error reproducing your case.
Then I can complete it and focus on the bug resolution.

Generics are the biggest burden of this project and it is not the simplest section to re-dive into after two years. :p

On a side note, I'm currently in holidays very far away from home till the end of the month. So I'll not be able to work on it until then. Hope this can wait for you. :(

@avk458
Copy link

avk458 commented Sep 11, 2024

@kbuntrock I noticed that #144 already has a PR that is similar to my case.

Have a nice trip. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants