Skip to content

Commit 568d6c0

Browse files
committed
updated naming article
1 parent 630aecd commit 568d6c0

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

graph/articles/naming.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Naming guidelines
1+
# Naming
22
## 1. Approach
33
Naming policies should aid developers in discovering functionality without having to constantly refer to documentation.
44
Use of common patterns and standard conventions greatly aids developers in correctly guessing common property names and meanings.
5-
Services SHOULD use verbose naming patterns and SHOULD NOT use abbreviations other than acronyms that are the dominant mode of expression in the domain being represented by the API, (e.g. Url).
5+
Services SHOULD use verbose naming patterns and MUST NOT use abbreviations other than acronyms that are the dominant mode of expression in the domain being represented by the API, (e.g. Url).
66

77
## 2. Casing
88
- Acronyms SHOULD follow the casing conventions as though they were regular words (e.g. Url).
9-
- All identifiers including namespaces, entityTypes, entitySets, properties, actions, functions and enumeration values SHOULD use lowerCamelCase.
9+
- All identifiers including namespaces, entityTypes, entitySets, properties, actions, functions and enumeration values MUST use lowerCamelCase.
1010
- HTTP headers are the exception and SHOULD use standard HTTP convention of Capitalized-Hyphenated-Terms.
1111

1212
## 3. Names to avoid

graph/articles/nullable.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Below are some examples of nullable and non-nullable properties.
2626

2727
## HTTP Requests
2828

29-
### {1} Create a servicePrincipal with no properties
29+
### 1. Create a servicePrincipal with no properties
3030

3131
```HTTP
3232
POST /servicePrincipals
@@ -40,7 +40,7 @@ POST /servicePrincipals
4040
}
4141
```
4242

43-
### {2} Create a servicePrincipal without a display name
43+
### 2. Create a servicePrincipal without a display name
4444

4545
```HTTP
4646
POST /servicePrincipals
@@ -62,7 +62,7 @@ Notes:
6262
2. `foo` has the default value as specified by its `DefaultValue` attribute in the CSDL
6363
3. `bar` has the default value as specified by its `DefaultValue` attribute in the CSDL
6464

65-
### {3} Update the display name of a service principal to null
65+
### 3. Update the display name of a service principal to null
6666

6767
```HTTP
6868
PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
@@ -81,7 +81,7 @@ PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
8181
Notes:
8282
1. `displayName` cannot be set to `null` because it has be marked with `Nullable="false"` in the CSDL.
8383

84-
### {4} Update the display name of a service principal
84+
### 4. Update the display name of a service principal
8585

8686
```HTTP
8787
PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
@@ -102,7 +102,7 @@ Notes:
102102
1. `displayName` can be set to any value other than `null`
103103
2. The response body here is provided for clarity, and is not part of the guidance itself. The [OData v4.01 standard](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity) states that the workload can decide the behavior.
104104

105-
### {5} Update the foo property of a service principal to null
105+
### 5. Update the foo property of a service principal to null
106106

107107
```HTTP
108108
PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
@@ -123,7 +123,7 @@ Notes:
123123
1. `foo` can be set to `null` because it has be marked with `Nullable="true"` in the CSDL.
124124
2. The response body here is provided for clarity, and is not part of the guidance itself. The [OData v4.01 standard](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity) states that the workload can decide the behavior.
125125

126-
### {6} Update the foo property of a service principal to a non-default value
126+
### 6. Update the foo property of a service principal to a non-default value
127127

128128
```HTTP
129129
PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
@@ -144,7 +144,7 @@ Notes:
144144
1. `foo` can be set to `something other than testval`
145145
2. The response body here is provided for clarity, and is not part of the guidance itself. The [OData v4.01 standard](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity) states that the workload can decide the behavior.
146146

147-
### {7} Update the bar property of a service principal to null
147+
### 7. Update the bar property of a service principal to null
148148

149149
```HTTP
150150
PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
@@ -163,7 +163,7 @@ PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
163163
Notes:
164164
1. `bar` cannot be set to `null` because it has be marked with `Nullable="false"` in the CSDL.
165165

166-
### {8} Update the bar property of a service principal to a non-default value
166+
### 8. Update the bar property of a service principal to a non-default value
167167

168168
```HTTP
169169
PATCH /servicePrincipals/00000000-0000-0000-0000-000000000001
@@ -184,7 +184,7 @@ Notes:
184184
1. `bar` can be set to `a new bar`
185185
2. The response body here is provided for clarity, and is not part of the guidance itself. The [OData v4.01 standard](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity) states that the workload can decide the behavior.
186186

187-
### {9} Create a service principal while customizing the display name
187+
### 9. Create a service principal while customizing the display name
188188
```HTTP
189189
POST /servicePrincipals
190190
{
@@ -206,7 +206,7 @@ Notes:
206206
2. `foo` has the default value as specified by its `DefaultValue` attribute in the CSDL
207207
3. `bar` has the default value as specified by its `DefaultValue` attribute in the CSDL
208208

209-
### {10} Create a service principal with a null display name
209+
### 10. Create a service principal with a null display name
210210
```HTTP
211211
POST /servicePrincipals
212212
{
@@ -225,7 +225,7 @@ POST /servicePrincipals
225225
Notes:
226226
1. `displayName` isn't required to create a new `servicePrincipal`, but it *can* be provided; it *cannot* be provided as `null` because the property was marked with `Nullable="false"`
227227

228-
### {11} Create a service principal with a value for the foo property
228+
### 11. Create a service principal with a value for the foo property
229229
```HTTP
230230
POST /servicePrincipals
231231
{
@@ -247,7 +247,7 @@ Notes:
247247
2. `foo` isn't required to create a new `servicePrincipal`, but it *can* be provided; this is orthogonal to whether or not the property has `Nullable="true"` or `Nullable="false"`.
248248
3. `bar` has the default value as specified by its `DefaultValue` attribute in the CSDL
249249

250-
### {12} Create a service principal with null for the foo property
250+
### 12. Create a service principal with null for the foo property
251251
```HTTP
252252
POST /servicePrincipals
253253
{
@@ -269,7 +269,7 @@ Notes:
269269
2. `foo` isn't required to create a new `servicePrincipal`, but it *can* be provided; because the property has `Nullable="true"`, a `null` value can be provided for it.
270270
3. `bar` has the default value as specified by its `DefaultValue` attribute in the CSDL
271271

272-
### {13} Create a service principal with a value for the bar property
272+
### 13. Create a service principal with a value for the bar property
273273
```HTTP
274274
POST /servicePrincipals
275275
{
@@ -291,7 +291,7 @@ Notes:
291291
2. `foo` has the default value as specified by its `DefaultValue` attribute in the CSDL
292292
3. `bar` isn't required to create a new `servicePrincipal`, but it *can* be provided; this is orthogonal to whether or not the property has `Nullable="true"` or `Nullable="false"`.
293293

294-
### {14} Create a service principal with null for the bar property
294+
### 14. Create a service principal with null for the bar property
295295
```HTTP
296296
POST /servicePrincipals
297297
{

graph/patterns/long-running-operations.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ The RELO pattern is the preferred pattern for long running operations and should
4646
used wherever possible. The pattern avoids complexity, and consistent resource
4747
presentation makes things simpler for our users and tooling chain.
4848

49-
In general, Microsoft Graph API guidelines for long running operations follow [Microsoft REST API
50-
Guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#13-long-running-operations).
51-
There are some deviations from the base guidelines where Microsoft Graph API standards require that you do one of the following:
52-
5349
- For the RELO pattern, you should return the Location header that indicates the location of the resource.
5450
- The API response says the targeted resource is being created by returning a 201 status code and the resource URI is provided in the Location header, but the response indicates that the request is not completed by including "Provisioning" status.
5551

0 commit comments

Comments
 (0)