API Docs clutter #192
m-gora
started this conversation in
Show and tell
Replies: 1 comment
-
I see you've added this to the draft PR, we might have to think about the timeline for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey MIW Contributors,
I'm starting this discussion since I just rebased development to my current feature branches.
While doing that I saw a change that introduced compound annotations to de-clutter the controllers from API Doc annotations.
This change is very much welcome, but it does not feel right to me, as it's only moving a problem to a different place.
During the design and implementation of the STS I was adding the openapi generator plugin, and configured it to create java interfaces which contains all the annotation clutter and keeps the controller classes sqeuaky clean.
Here's an example how it looks like:
Controller Implementation
OpenAPI generator generated interface
Since spring maps the annotations even via interfaces, we can just let them get autogenerated with the following gradle config.
To me this would be the most stable approach, as we can just regenerate api docs and interfaces from specs and don't care about it at all, while having controllers only care about the actual implementation.
Please let me know what you think.
Beta Was this translation helpful? Give feedback.
All reactions