Add OpenApi annotations to resources#311
Conversation
|
cc: @EricWittmann |
|
Cool! Although what is the utility of having open API annotations on code that was generated from a specification? Typically open API annotations are useful to document code when using a code first approach. |
|
It is a good question, I think to render a swagger exposed through HTML. I know that the user can use the OpenAPI specification file to expose the beautiful HTML, but to add again, avoid the need to write code. |
|
OK thanks - that was the only use-case I could think of, and I was wondering if you had some other need in mind. I do think that most users would simply include the openapi spec in the application for this purpose, but it's also true that there may not be a 1-1 mapping between the spec and the resulting generated JAX-RS code. So I can see a motivation to want a new openapi spec generated from the code, which would perhaps (in some cases) be more technically accurate for API consumers. |
|
I agree with you and I do no have another need in mind for now... It was a feature request from Quarkus OpenApi Generator extension. |
|
I am out today (at work) when I got my laptop I will fix this error. |
|
Today's churn has resulted in conflicts, sorry about that. I renamed |
|
I am fixing here, in the future (maybe) we can remove the expected dirs for Java 11 |
|
Done @EricWittmann, ty! |
Added
Changed
By default all generated resources contains OpenAPI annotations.
Closes #309