Replies: 5 comments 5 replies
-
Hello @bossenti, Unfortunately, the Another thought regarding changing variable names. When we use enums, the convention will be uppercase. However, many adapaters, processors, or sinks use lowercase. When we migrate them, we need a way to migrate this for existing instances as well. Does anyone have any ideas on this? Do we need to update the descriptions in couchdb for this or is it enough to replace the assets in the Cheers, |
Beta Was this translation helpful? Give feedback.
-
Thats a good point. Thanks for bringing this up, I'll prepare an issue for this. |
Beta Was this translation helpful? Give feedback.
-
I cannot add a lot here, but doing both should bring us on the safe side? |
Beta Was this translation helpful? Give feedback.
-
Hi,
So due to the rather small improvements and these drawbacks, I'm probably more in favor to leave the approach as-is and only change or deprecate the structure of our developer-faced APIs in case it's really needed. What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hello, Regarding the case sensitivity, I have no opinion. However, the point about updatability is very good. What are the options that we have? |
Beta Was this translation helpful? Give feedback.
-
Currently, we have two approaches to define and manage labels in StreamPipes.
Option A: define labels as static strings in a class, e.g.:
Option B: define an enum with label keys, e.g.:
I personally would prefer to use option B as recommended development pattern.
One downside this approach comes with is the more verbose accessing of values, e.g.:
This can be overcome by implementing a new signature of
withId
that takes an Enum value as input and calls the.name()
method.The resource file would then use the same key as the enum value is called, e.g.:
In my opinion this is more concise and consistent.
We could agree on using the enum approach as our recommended way of handling label keys but still keep the old way so that we don't break anything.
How do you think about this proposal? Is there anything more to consider?
Beta Was this translation helpful? Give feedback.
All reactions