Generate open API json/yaml from Java endpoints (jax-rs)
Answered
I've been working on a service that has something like 80 ~ 90 endpoints in differents controllers developed in JAX-RS (A really anciest project, that didn't even uses Maven).
Is there any way to generate automagically an open api documentation by using the javadoc and annotations of the endpoints?
I have intellij ultimate, so looking at the endpoint tab, if I could just copy all of those methods in a scratch file or something to do multiediting would be great.
But if the IDE can do it for me, it would be even nicer. I know that intellij can generate code from openAPI specification, i need to do just the opposite.
Thanks
Please sign in to leave a comment.
There is no such built-in functionality. You may try a third-party plugin:
https://plugins.jetbrains.com/plugin/8433-openapi-generator/
Finally, there is such built-in functionality!
https://blog.jetbrains.com/idea/2022/10/intellij-idea-2022-3-eap-4/#Improved_OpenAPI_schema_generation