Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating Swagger YAML from JSDoc?

I have a large JS API fully documented with JSDoc, and I am building a swagger based REST service to make the API available on a network.

I manually built an initial version of the YAML swagger spec, but the problem is that it rapidly gets out of sync with the JS API, because it is still evolving, specially in the properties of the objects involved.

What I would like to do is to automatically generate the swagger YAML, at least the data definition part of it, directly from the JSDoc comments. Is there any tool that can help me to automate it?

like image 940
Albert Avatar asked Sep 24 '15 15:09

Albert


1 Answers

swagger-jsdoc may meet your requirement.

like image 173
William Cheng Avatar answered Oct 14 '22 21:10

William Cheng