You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thufschmitt
changed the title
The generated documentation doesn't allow introspecting contracts
Allow introspecting contracts in the generated documentation
Nov 17, 2023
(the title of the issue is rather bad, apologies about that)
Is your feature request related to a problem? Please describe.
Given a Nickel expression like
the doc output will look like this:
This is only marginally useful since I have no way of knowing what
TypeOfFoo
is without looking at the code.Describe the solution you'd like
Anything that makes it possible to really understand the interface by just looking at the doc.
A few possibilities:
Inline the contracts when can be. That would make the above be documented as:
This is nicer in that example, but probably not always what we want (and might even lead to infinite recursion for cyclic contracts)
Add hyperlinks to the documentation (and also document somewhere the non-exported fields that are needed). This could be rendered as:
(where
TypeOfFoo
in the documentation offoo
is a link to## TypeOfFoo
).Add hyperlinks, but only if the value is exported. So the example would render exactly as today, but
would render as
The text was updated successfully, but these errors were encountered: