kbuntrock / openapi-maven-plugin

Generate openapi documentation for SpringMVC or JaxRS/JakartaRS projects.
https://kbuntrock.github.io/openapi-maven-plugin/
MIT License
13 stars 8 forks source link

`Type VAL (+TypeVariableImpl is not supported yet.` #95

Closed magx2 closed 6 months ago

magx2 commented 6 months ago

Hey,

I have another issue. When running your plugin I'm getting this error: Type VAL (+TypeVariableImpl is not supported yet.. I don't know what is causing it, maybe Lombok?

Caused by: java.lang.RuntimeException: Type VAL (+TypeVariableImpl is not supported yet.
    at io.github.kbuntrock.model.DataObject.<init> (DataObject.java:141)
    at io.github.kbuntrock.TagLibrary.inspectObject (TagLibrary.java:113)
    at io.github.kbuntrock.TagLibrary.exploreDataObject (TagLibrary.java:87)
    at io.github.kbuntrock.TagLibrary.inspectObject (TagLibrary.java:114)
    at io.github.kbuntrock.TagLibrary.exploreDataObject (TagLibrary.java:77)
    at io.github.kbuntrock.TagLibrary.exploreDataObject (TagLibrary.java:84)

https://github.com/kbuntrock/openapi-maven-plugin/blob/1184f467bd18bf3d8104ca30db0abe9dc903d2ad/openapi-maven-plugin/src/main/java/io/github/kbuntrock/model/DataObject.java#L141

Ps In error message in DataObject.java#L140 you are missing closing ) 😉

magx2 commented 6 months ago

Can you please add some debug info which class and method you are parsing at the time? So it would be easier to find out what is the problem

kbuntrock commented 6 months ago

Gosh, I kinda like that you have some specific issues which will make this plugin better, but I feel sorry you run into so much.

Don't know about lombok, it was one of my lead on your previous bug and it didn't seem to bother the plugin.

Could you pin down the problem and enhanced your previous error demo project so I can work on it?

You can activate debug logs with the "-X" maven option. Like "mvn compile -X"

And you a right about adding informations . I should think about adding them in the error directly.

PS : if the problem is due to a single controller / method, you can then exclude it temporarily while waiting for the fix with the blacklist configuration.

magx2 commented 6 months ago

if the problem is due to a single controller / method, you can then exclude it temporarily while waiting for the fix with the blacklist configuration.

The problem is that I don't know which controller/method this is. Please add more logging (I'm already running --debug option) so I can reproduce it

magx2 commented 6 months ago

It's not lombok. I've cloned you repo and stopped with debugger.

Let me try to reproduce it

kbuntrock commented 6 months ago

if the problem is due to a single controller / method, you can then exclude it temporarily while waiting for the fix with the blacklist configuration.

The problem is that I don't know which controller/method this is. Please add more logging (I'm already running --debug option) so I can reproduce it

Isn't there some logs like these ones with the debug option? The last one before the error would be our candidate (can be very fast if it's the first ... :P)

[DEBUG] Parsing tag : FooController
[DEBUG] Parsing endpoint FooController
[DEBUG] Parsing request method : youAreAwesome
[DEBUG] Reading parameters from youAreAwesome
[DEBUG] Parameter : foo
[DEBUG] RequestBody annotation detected, location is BODY
[DEBUG] DataObject{openApiType=ARRAY, arrayItemDataObject=DataObject{openApiType=OBJECT, arrayItemDataObject=null}}
[DEBUG] Finished parsing endpoint : youAreAwesome - POST
--- next class (added comment, not present in real debug logs)
[DEBUG] Parsing tag : GenericController
[DEBUG] Parsing endpoint GenericController
[DEBUG] Parsing request method : setTimePage
[DEBUG] Reading parameters from setTimePage
[DEBUG] Parameter : timePage
[DEBUG] RequestBody annotation detected, location is BODY
[DEBUG] DataObject{openApiType=OBJECT, arrayItemDataObject=null}
[DEBUG] Finished parsing endpoint : setTimePage - POST
[DEBUG] Parsing request method : setAccountPage
[DEBUG] Reading parameters from setAccountPage
[DEBUG] Parameter : accountPage
[DEBUG] RequestBody annotation detected, location is BODY
[DEBUG] DataObject{openApiType=OBJECT, arrayItemDataObject=null}
[DEBUG] Finished parsing endpoint : setAccountPage - POST
magx2 commented 6 months ago

Check my project. I've pushed new commit with the error that I've mentioned

kbuntrock commented 6 months ago

Check my project. I've pushed new commit with the error that I've mentioned

Thank you, will work on it over the weekend.

magx2 commented 6 months ago

Awesome 👌😀! Ps you can work with some different cases of generics + inheritance. Maybe something new will popup 🤔😉

pt., 27 paź 2023, 23:15 użytkownik Kévin Buntrock @.***> napisał:

Check my project. I've pushed new commit with the error that I've mentioned

Thank you, will work on it over the weekend.

— Reply to this email directly, view it on GitHub https://github.com/kbuntrock/openapi-maven-plugin/issues/95#issuecomment-1783519936, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWTLHTE5XXICSQSTI72CVDYBQP5VAVCNFSM6AAAAAA6SQGJU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGUYTSOJTGY . You are receiving this because you authored the thread.Message ID: @.***>

kbuntrock commented 6 months ago

@magx2 : Done some work and merge to the main branch. I was handling types coming from outside, coming from the parent hierarchy, but not the two together. Yes, genericity represent already 50% percent on my time on this project ^^ Every time I finally think I've handled everything, something new comes up.

Since you managed to clone the repo, can you pull "dev" and check the v0.0.17-SNAPHOST if there is any other bug with your project? I will wait your check before releasing the version, in case you bring something new tomorrow. :P

magx2 commented 6 months ago

Sure. I will do it on Monday

niedz., 29 paź 2023, 16:11 użytkownik Kévin Buntrock < @.***> napisał:

@magx2 https://github.com/magx2 : Done some work and merge to the main branch. I was handling types coming from outside, coming from the parent hierarchy, but not the two together. Yes, genericity represent already 50% percent on my time on this project ^^ Every time I finally think I've handled everything, something new comes up.

Since you managed to clone the repo, can you pull "dev" and check the v0.0.17-SNAPHOST if there is any other bug with your project? I will wait your check before releasing the version, in case you bring something new tomorrow. :P

— Reply to this email directly, view it on GitHub https://github.com/kbuntrock/openapi-maven-plugin/issues/95#issuecomment-1784140019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWTLHTBT2IVZSZNWIDCWF3YBZP23AVCNFSM6AAAAAA6SQGJU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBUGE2DAMBRHE . You are receiving this because you were mentioned.Message ID: @.***>

magx2 commented 6 months ago

Looks like it's working 🎉😁!

kbuntrock commented 6 months ago

Awesome. :) I'll release over lunch break. :)

kbuntrock commented 6 months ago

@magx2 : v0.0.17 is up.

magx2 commented 6 months ago

Awesome! Thanks!

pon., 30 paź 2023 o 15:34 Kévin Buntrock @.***> napisał(a):

@magx2 https://github.com/magx2 : v0.0.17 is up.

— Reply to this email directly, view it on GitHub https://github.com/kbuntrock/openapi-maven-plugin/issues/95#issuecomment-1785350679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWTLHV2HHANMNB5RQMEDRTYB63GXAVCNFSM6AAAAAA6SQGJU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGM2TANRXHE . You are receiving this because you were mentioned.Message ID: @.***>

-- Pozdrawiam Martin Grześlowski