ossuminc / riddl

A compiler for the DDD-based design language RIDDL
https://riddl.tech/
Apache License 2.0
21 stars 6 forks source link

Enable Substitutable Text #196

Open reid-spencer opened 2 years ago

reid-spencer commented 2 years ago

Textual content in riddl such as doc blocks or quoted strings needs to allow parameterized substitutions. It is proposed that RIDDL support:

JamesYopp commented 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?

reid-spencer commented 2 years ago

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.

reid-spencer commented 2 years ago

Probably Hugo has a way of doing this or it can be conjured from Hugo/Go facilities.