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
interfaceIPolicy {
/** * @dev An enumeration representing the status of a policy. * @param Active The policy is active. * @param Cancelled The policy is cancelled. * @param Expired The policy is expired. */enum PolicyStatus {
Active,
Cancelled,
Expired
}
/** * @dev A struct representing the data associated with a policy. * @param policyholder The address of the policy holder. * @param status The status of the policy. */struct Policy {
address policyholder;
PolicyStatus status;
}
}
I would like to propose an extension of NatSpec support to include the '@param' tag for struct and enum elements. This enhancement would provide more comprehensive documentation capabilities for these essential components, allowing developers to articulate detailed information about the purpose and usage of each parameter within a struct or enum.
We recently added the ability to document struct definitions (without @param, since it's not one) in 0.8.20, and currently have an open PR that would allow you to document individual enum values (again without @param, but it's still along the lines of what you're looking for) - see #14193 (scroll down toward the end of the changed files to see the tests, and thus example usage).
Otherwise, we have no further plans on working on natspec.
I would like to propose an extension of NatSpec support to include the '@param' tag for struct and enum elements. This enhancement would provide more comprehensive documentation capabilities for these essential components, allowing developers to articulate detailed information about the purpose and usage of each parameter within a struct or enum.
Ref: #14267
The text was updated successfully, but these errors were encountered: