carp.core-kotlin icon indicating copy to clipboard operation
carp.core-kotlin copied to clipboard

Expose request object names as infrastructure helper

Open Whathecode opened this issue 4 years ago • 1 comments

Application services have a matching request object for each possible request.

For logging and tracing, it is a common scenario names for these need to be printed. It is possible to statically link and infer these names from concrete classes in Kotlin.

However, this syntax is lengthy, and furthermore, not polymorphic. If we expose a name property on all request objects (optionally with formatting options, e.g., camelCase, underscore, plain spaces) this gives again an extra opportunity to handle requests in a uniform way where possible, increasing code reuse.

Whathecode avatar Jan 08 '21 11:01 Whathecode

@ltj What are the specific requirements for you in terms of naming? I noticed you used underscores, is this a hard requirement, or you would be okay with applying your own converter functions (e.g., in case CARP core exposes names with spaces)?

Whathecode avatar Jan 08 '21 11:01 Whathecode