mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
535 stars 344 forks source link

HTML documentation of YANG model #236

Closed agunturu closed 8 years ago

agunturu commented 8 years ago

Hello, I am planning to write a plugin that generates HTML documentation based on the "description" field. Is that currently possible in the current tool? Also, what is the best way to contribute to this repo, if new plugins are developed? Thanks, -Anil

llhotka commented 8 years ago

Your mileage may vary, but I would approach this task by writing an XSLT stylesheet that would transform the YIN format. This would IMO be reasonably easy to do. A good way of contributing any code is to create a pull request.

wlupton commented 8 years ago

I have been thinking about writing a pyang HTML output format that would use more information than just that in the description field. The basic idea would be to generate a view of the YANG that represents as much as possible of the information in a module (or modules) in a form that can be understood by non YANG experts. I was thinking that the description could be regarded as markdown and also that some heuristics (and maybe eventually additional markup) could be used for automatic formatting of lists, links and so on.

This HTML output format would be inspired by the HTML report that is generated from BBF TR-069 data models (these are defined in XML that conforms to a so-called "DM" schema; there are a lot of analogies with YANG but YANG is more fully-featured). Google "CWMP" to find some examples (or contact me directly).

As yet I have done nothing about this, but have been intending to at least float the idea to see who else might be interested.