primitive-dodoc icon indicating copy to clipboard operation
primitive-dodoc copied to clipboard

Lots of `undefined` for function params descriptions

Open sebastiantf opened this issue 2 years ago • 4 comments

The generated docs are having a lot of undefined for some ~function parameters~ function parameters descriptions, while for some function parameters they are are appearing good, even though the Natspec is in the correct format and the same.

When running on debugMode, the dev docs have the correct parameters and descriptions, without any undefined. But they do not persist till the markdown output

I noticed this in the Primitive docs too: https://library.primitive.xyz/technical/smart-contracts/autogenerated-docs/core/PrimitiveEngine#parameters-1

sebastiantf avatar May 25 '22 17:05 sebastiantf

This can happen with unnamed parameters (for example when using public mappings, etc), I'll try to investigate this though, because it's a bit annoying!

clemlak avatar May 26 '22 07:05 clemlak

Can you please elaborate "unnamed parameters"? I wasn't using any public mapping. There were some unnamed return variables though.

sebastiantf avatar May 26 '22 07:05 sebastiantf

All right, then this might be the same issue: when parameters are unnamed, Dodoc might export their name as undefined. Let's see if we can figure something better though, any ideas?

clemlak avatar May 26 '22 07:05 clemlak

Oh man! I just realized I was saying the wrong thing 🤦🏻‍♂️

I actually meant that the descriptions for the function params were undefined not exactly the params themselves.

Apologies for the confusion

sebastiantf avatar May 26 '22 07:05 sebastiantf