Skip to content

[TM-219] Auto contract doc

Konstantin Ivanov requested to merge martoon/tm219-auto-contract-doc into master

Description

Problem: writing documentation manually is tiresome and error-prone (one can forget to mention something). Also, assuming that we avoid duplication in text, information gets scattered across the document. For instance, we do not mention for (almost) each endpoint of Token service that it can throw WalletDoesNotExist error, rather we mention this fact once in the beginning of Token description. This makes things slightly more complicated to a reader.

Solution: generate documentation from contract code.

Used in this MR.

Example of documentation can be found here (download and open e.g. in this editor)

Related issue(s)

https://issues.serokell.io/issue/TM-219

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Edited by Konstantin Ivanov

Merge request reports

Loading