[#45] improve autodoc for entrypoints.
Description
Current automatically generated documentation has some drawbacks in it, specifically
- 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). - "How to call this entry point" section specifies how to wrap entrypoint data into
Left
andRight
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 inRight
andLeft
constructors. So this hiding needs to be optional. - It would be nice to provide example parameter for each entrypoint if that's not too hard.
- Links to
tzip
are broken after recent changes in that repo. I propose to use stable (permanent) links to avoid it in future. - 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 othertzip
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
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Anton Myasnikov