Open reid-spencer opened 2 years ago
So in the case where I have 2 parameters:
substitutions.yaml
memberList: "A list of $thing to be $action an organization."
mySpec.riddl
command AddMembersToOrg is {???} briefly "${memberList:thing="members",action="added to"}"
So the resulting briefly would be: A list of members to be added to an organization.
Is that what you were thinking?
Yes, exactly. It's just naming the parameters instead of numbering them. That way order doesn't matter and it is more descriptive for the reader.
Probably Hugo has a way of doing this or it can be conjured from Hugo/Go facilities.
Textual content in riddl such as doc blocks or quoted strings needs to allow parameterized substitutions. It is proposed that RIDDL support:
name: value
domain foo {???} briefly "Has a ${name} substitution from the yaml file"
would yield a briefly of"Has a value substitution from the config file"
domain foo {???} briefly "Has a ${name:p="value"}
so that if the yaml file contained:name: "substitution for p: $p"
then the resulting briefly would be:"Has a substitution for p: value"