Initial attempt at rendering annotations on types. (#10)
Initial attempt at rendering annotations on types. (#10)

I’m submitting this, as @sichvoge may be interested in it. It’s not
finished yet, but I wanted to see if this was starting on the right
lines…

Concentrating on the semantics first, before any styling. This
implements the “simple” method from [our previous
discussion](https://github.com/raml2html/raml2html/issues/204#issuecomme
nt-311037262).

Currently it will pick up on type annotations and render them next to
the type.  For type annotations that are just flags (i.e. have a `nil`
type) it will display only the annotation name.

Limitation: when an annotation *does* have properties, they are shown
as JSON, not in a structured way. It looks like I may need to modify
raml2html’s source to add a property to the `item` to say that it is an
annotation.  Then I can query this in `item.nunjucks` and render it
more appropriately.  Please me know if you think this is the right way
to go.
raml2html/default-theme