Skip to content

[#45] improve autodoc for entrypoints.

Description

Current automatically generated documentation has some drawbacks in it, specifically

  1. Parameter is only specified in Haskell types. Sometimes people want to use Michelson directly and may be even not familiar with Haskell. So we should provide Michelson representation as well. Also it is no obvious how to map tuples with more than 2 items to Michelson (though for size 3 it can be seen in Types section).
  2. "How to call this entry point" section specifies how to wrap entrypoint data into Left and Right constructors, but it is redundant after Babylon update due to entrypoints feature. But note that in case of upgradeable contracts parameter entrypoints are still need to be wrapped in Right and Left constructors. So this hiding needs to be optional.
  3. It would be nice to provide example parameter for each entrypoint if that's not too hard.
  4. Links to tzip are broken after recent changes in that repo. I propose to use stable (permanent) links to avoid it in future.
  5. Sometimes "entrypoint" is written with a space.

So here's a little roadmap of what needs to be done to pass acceptance criteria:

  • Michelson type of each entrypoint should be part of documentation.
  • "How to call this entry point" only describes it for Haskell, ideally also provides an example for Michelson (and maybe for Haskell as well).
  • All tzip links are up to date (feel free to update other tzip links in the repo).
  • "Entrypoint" spelling is consistent (no space).

Related issue(s)

Resolves #45 (closed)

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:
    • I updated the changelog if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Anton Myasnikov

Merge request reports