I am switching my APIs to a more organized and scalable structure and I'd like to change some annotated endpoints to a "programmatic usage" in order to use routes.
How can I add the same endpoint documentation via pr that I would via annotations? Is there a way to add it manually in the endpoints function and somehow "generate" a swagger file in the end?
Just for clarity, what I want is to transform this:
#* Say hello
#* @get /hello
#* @param name Name
#* @tag silly
function(name){
paste("Hello", name)
}
For everything endpoint you can use the ... to alter the behavior of PlumberEndpoint$new when you call pr$handle. In your case it would probably be params, comments, responses and tags.
As @barret said, this needs more documentation and examples.