When comparing YUIDoc vs apiDoc, the Slant community recommends apiDoc for most people. In the question“What are the best JavaScript documentation tools?” apiDoc is ranked 3rd while YUIDoc is ranked 4th. The most important reason people chose apiDoc is:
Adds ability to test out your endpoints from the documentation
Ranked in these QuestionsQuestion Ranking
Pros
Pro Cross-platform
YUIDoc is not available for JavaScript only, it supports every language that has /**/
comment blocks.
Pro Great output
YUIDoc's default theme is very appealing. The output it renders is very readable, searchable and user-friendly.
Pro Live preview
A standalone doc server is included which allows you to easily preview the documentation as it's being written.
Pro Built in REST client
Adds ability to test out your endpoints from the documentation
Pro Multi language support
Supports documenting other languages (other than just JS)
Cons
Con The name of the method/class need to be mentioned in the comments
Since YuiDoc only parses comment blocks, it requires the names of the methods to be specified there, ignoring what's outside of the comment block.
Con Only really useful for RESTful web APIs
Can't be used for documenting the application in general