stadlar / IST-FUT-FMTH

Creative Commons Attribution 4.0 International
12 stars 19 forks source link

Claims - Use singular naming for individual objects in GetClaims operation #179

Closed thebingi closed 1 year ago

thebingi commented 1 year ago

When examining operations that return lists. For example, the GetClaims operation returns an object named "ClaimListDetails," which contains a list of objects also named "ClaimDetails." I suggest changing the name of the individual claim object to "ClaimDetail" for the following reasons:

Clarity and readability: Using singular names for individual objects makes the code more readable and easier to understand. The singular name "ClaimDetail" clearly communicates that it represents a single claim detail, whereas "ClaimDetails" could be misinterpreted as a collection of claim details.

Consistency and best practices: It is a common convention in most programming languages, including C#, to use singular names for classes or objects that represent single instances. Following this convention makes your code more consistent with other projects and libraries, which helps other developers quickly understand your code.

Logical separation: Using singular names for individual objects and plural names for collections or containers allows for a logical separation between the two concepts. This distinction helps developers understand how your code is structured and makes it easier to identify the relationships between objects and collections.

In summary, I suggest changing the name of the individual claim object to "ClaimDetail" to improve code readability, align with programming best practices and conventions, and help logically separate individual objects from collections.

The same issue applies to "ClaimTemplateList" and "ClaimTemplateListDetails.

Kristinn-Stefansson commented 1 year ago

Meeting TN-FMÞ-VH7-16 suggested taking a closer look at the IOBWS3.0.yaml to use as a comparison, where it seems that accountdetails is found in similar usage.

thebingi commented 1 year ago

No need to Change