render method

String render(
  1. SpecDocument doc
)

Renders the DocSpecs markdown rendition of a decoded document.

Throws SbpRenderException when a value cannot be rendered; the runtime refuses such a value with an ArgumentError.

Implementation

String render(SpecDocument doc) {
  try {
    return doc.toMarkdown(model, rootType: rootType);
  } on ArgumentError catch (e) {
    throw SbpRenderException('${e.message}');
  }
}