From aded31f414582b89a86778944c8c631eaa0f6666 Mon Sep 17 00:00:00 2001 From: dkershaw Date: Thu, 12 Sep 2024 16:05:15 +0100 Subject: [PATCH] Updated naming rule for Booleans --- graph/GuidelinesGraph.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph/GuidelinesGraph.md b/graph/GuidelinesGraph.md index 4aac6a65..ea684fbf 100644 --- a/graph/GuidelinesGraph.md +++ b/graph/GuidelinesGraph.md @@ -116,7 +116,7 @@ Following is a short summary of the most often used conventions. | :ballot_box_with_check: **SHOULD** use the Duration type for durations, but if using an `int`, append the units. | - **Right:** passwordValidityPeriod—an Edm.Duration
- **Right:** passwordValidityPeriodInDays — an Edm.Int32 (use of Edm.Duration type is preferable)
- **Wrong:** passwordValidityPeriod — an Edm.Int32 | | :no_entry: **MUST NOT** use suffix property names with primitive type names unless the type is temporal. | - **Right:** isEnabled or amount
- **Wrong:** enabledBool | | :ballot_box_with_check: **SHOULD** prefix property names for properties concerning a different entity. | - **Right:** siteWebUrl on driveItem or userId on auditActor
- **Wrong:** webUrl on contact when it's the companyWebUrl | -| :ballot_box_with_check: **SHOULD** prefix Boolean properties with `is`, unless this leads to awkward or unnatural sounding names for Boolean properties. | - **Right:** isEnabled or isResourceAccount
- **Wrong:** enabled or allowResourceAccount
- **Right:** allowNewTimeProposals or allowInvitesFrom (subjectively more natural than the following examples)
- **Wrong:** isNewTimeProposalsAllowed or isInvitesFromAllowed (subjectively more awkward that the preceding examples) | +| :ballot_box_with_check: **SHOULD** prefix Boolean properties with `is`, unless this leads to awkward or unnatural sounding names for Boolean properties. | - **Right:** isEnabled or isResourceAccount
- **Wrong:** enabled or allowResourceAccount
- **Right:** hasChildren or hasSubscriptions
- **Wrong:** isChildren or isSubscriptions
- **Right:** allowNewTimeProposals or allowInvitesFrom (subjectively more natural than the following examples)
- **Wrong:** isNewTimeProposalsAllowed or isInvitesFromAllowed (subjectively more awkward that the preceding examples) | | :no_entry: **MUST NOT** use collection, response, or request suffixes. | - **Right:** addresses
- **Wrong:** addressCollection | #### Tree and graph structures