openmicroservices.org icon indicating copy to clipboard operation
openmicroservices.org copied to clipboard

Remove dollar in auto-generated attributes

Open wilzbach opened this issue 6 years ago • 9 comments

image

As this is not part of the markdown (e.g. https://github.com/microservices/microservice.guide/tree/master/schema/actions#arguments), I presume the dollar accidentally ended up in the output?

wilzbach avatar Apr 02 '19 15:04 wilzbach

@wilzbach It's intentional. We use it to describe something user defined, such as an action name.

judepereira avatar Aug 13 '19 16:08 judepereira

Also, these are not auto generated, but specified in the actual README.md files.

judepereira avatar Aug 13 '19 16:08 judepereira

It's intentional. We use it to describe something user defined, such as an action name.

A single dollar typically means end of stream. Using it for anything else is breaking conventions. Can't we at least do ${actionName} then?

wilzbach avatar Aug 13 '19 20:08 wilzbach

actions.${actionName}.httpis bash-ism. How about actions.<action name>.http?

judepereira avatar Aug 14 '19 12:08 judepereira

The $ does work though - Steve used it initially, and then I understood what it meant by looking at it. The meaning was conveyed successfully :)

judepereira avatar Aug 14 '19 12:08 judepereira

How about actions..http?

Of course. I prefer that even over ${actionName}. If we have to use a single symbol, use the established wildcard symbol actions.*.http (though this is a bit confusing with RegEx syntax) or the placeholder symbol actions.•.http. tl;dr:

actions.<action name>.http
actions.•.http

The meaning was conveyed successfully :)

But you're a very experienced programmer. My point was that it is potentially confusing and that beginners will struggle to understand the meaning.

wilzbach avatar Aug 14 '19 13:08 wilzbach

I like * and . I can switch the rendering of this for all in just one rule.

judepereira avatar Aug 14 '19 13:08 judepereira

$ also indicates a variable in a variety of languages, shell scripting, php, Perl etc which is where I suspect this came from, so I wouldn’t say it is breaking conventions. That said, I do agree that we can be far more descriptive here so +1.

williammartin avatar Sep 30 '19 12:09 williammartin

Ah I see that you were being explicit that a single dollar by itself would break conventions. Agree with that.

williammartin avatar Sep 30 '19 12:09 williammartin