-
Notifications
You must be signed in to change notification settings - Fork 127
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
Can jsondoc understand spring annotation, like @RequestBody and @PathVariable? #111
Comments
It does can understand spring's annotations, but it's has an "opt-it" strategy, meaning that you still need to put jsondoc annotations to decide what you would like to document and what not. |
Would it be possible to have a more global flag to eliminate the need to explicitly add annotations for everything? Maybe a file or package scope flag? |
Yes, it will be good. |
The good thing about jsondoc is that it is framework agnostic, meaning that you can put its annotation on anything you want (you can even annotate non-controller and non-dto classes and have the doc and playground generated and working properly). To do that I needed to require the "technical writer" to decide what to document, this is the reason behind the "annotate everything" approach. But you are right, @apimethod would be enough, in case you are for example annotating a spring controller. Changing that in this moment would mean a lot of work though, which I cannot afford right now. |
+1 for this enhancement. The opt-in approach can be controlled by a package level global flag (example: if the flag is true for a given package, then you have to opt in and explicitly annotate in order to generate documentation for the controllers in that package). But that should be only for annotations @Api and/or @apimethod. I believe the @ApiPathParam, @ApiRequestBody annotations are redundant. The @PathVariable and @RequestBody annotations should be enough for generating playground. |
Can jsondoc understand spring annotation?
If it can, i remove @ApiBodyObject annotation.
The text was updated successfully, but these errors were encountered: