Skip to content

Commit f0fdbd5

Browse files
authored
Update collections.md
1 parent 114fe12 commit f0fdbd5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

graph/articles/collections.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -358,21 +358,21 @@ The model can be updated to have two collections side-by-side, deprecating the e
358358
+ <PropertyValue Property = "Date" Date="2020-08-20"/>
359359
+ <PropertyValue Property = "Version" String="2020-08/KeyCredentials"/>
360360
+ <PropertyValue Property = "Kind" EnumMember="Org.OData.Core.V1.RevisionKind/Deprecated"/>
361-
+ <PropertyValue Property = "Description" String="keyCredentials has been deprecated. Please use keyCredentialsAsEntities instead."/>
361+
+ <PropertyValue Property = "Description" String="keyCredentials has been deprecated. Please use keyCredentials_v2 instead."/>
362362
+ <PropertyValue Property = "RemovalDate" Date="2022-08-20"/>
363363
+ </Record>
364364
+ </Collection>
365365
+ </Annotation>
366366
+ </Property>
367-
+ <NavigationProperty Name="keyCredentialsAsEntities" Type="Collection(self.keyCredentialAsEntity)" ContainsTarget="true" />
367+
+ <NavigationProperty Name="keyCredentials_v2" Type="Collection(self.keyCredential_v2)" ContainsTarget="true" />
368368
</EntityType>
369369

370370
<ComplexType Name="keyCredential">
371371
<Property Name="keyId" Type="Edm.Guid" />
372372
<Property Name="endDateTime" Type="Edm.DateTimeOffset" />
373373
</ComplexType>
374374

375-
+<EntityType Name="keyCredentialAsEntity">
375+
+<EntityType Name="keyCredential_v2">
376376
+ <Key>
377377
+ <PropertyRef Name="keyId" />
378378
+ </Key>
@@ -382,17 +382,17 @@ The model can be updated to have two collections side-by-side, deprecating the e
382382
```
383383
Clients will now be able to refer to individual `keyCredential`s using `keyId` as a key, and they can now remove those `keyCredential`s using `DELETE` requests:
384384
```http
385-
DELETE /applications/{applicationId}/keyCredentialsAsEntities/{some_keyId}
385+
DELETE /applications/{applicationId}/keyCredentials_v2/{some_keyId}
386386
```
387387
```http
388388
HTTP/1.1 204 No Content
389389
```
390-
While both properties exist on graph, the expectation is that `keyCredentials` and `keyCredentialsAsEntities` are treated as two "views" into the same data.
390+
While both properties exist on graph, the expectation is that `keyCredentials` and `keyCredentials_v2` are treated as two "views" into the same data.
391391
To meet this expectation, workloads must:
392-
1. Keep the properties consistent between `keyCredential` and `keyCredentialAsEntity`.
392+
1. Keep the properties consistent between `keyCredential` and `keyCredential_v2`.
393393
Any changes to one type must be reflected in the other type.
394394
2. Reject requests that update both collections at the same time.
395-
A request that adds an item to `keyCredentialsAsEntities` while replacing the content of `keyCredentials` must rejected with a `400`, for example:
395+
A request that adds an item to `keyCredentials_v2` while replacing the content of `keyCredentials` must rejected with a `400`, for example:
396396
```http
397397
PATCH /applications/{applicationId}
398398
{
@@ -402,7 +402,7 @@ PATCH /applications/{applicationId}
402402
"endDateTime": "2012-12-03T07:16:23Z"
403403
}
404404
],
405-
"keyCredentialsAsEntities@delta": [
405+
"keyCredentials_v2@delta": [
406406
{
407407
"keyId": "20000000-0000-0000-0000-000000000000",
408408
"endDateTime": "2012-12-03T07:16:23Z"
@@ -415,7 +415,7 @@ HTTP/1.1 400 Bad Request
415415
{
416416
"error": {
417417
"code": "badRequest",
418-
"message": "'keyCredentials' and 'keyCredentialsAsEntities' cannot be updated in the same request.",
418+
"message": "'keyCredentials' and 'keyCredentials_v2' cannot be updated in the same request.",
419419
}
420420
```
421421

0 commit comments

Comments
 (0)