Skip to content

Commit 192ef66

Browse files
authored
Merge pull request #369 from microsoft/op-lc-graph-guidelines
Edit patterns and guidelines
2 parents 8137718 + 8978636 commit 192ef66

File tree

6 files changed

+241
-317
lines changed

6 files changed

+241
-317
lines changed

graph/GuidelinesGraph.md

Lines changed: 217 additions & 287 deletions
Large diffs are not rendered by default.

graph/deprecation.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
### Deprecation Guidelines
1+
# Deprecation guidelines
22

3-
If your API requires the introduction of breaking changes you must add Revisions annotations to the API definition with the following terms:
3+
If your API requires the introduction of breaking changes, you must add Revisions annotations to the API definition with the following terms:
44

5-
6-
- Date: Date when the element was marked as deprecated.
7-
- Version: Used to organize the ChangeLog. Use the format "YYYY-MM/Category" where "YYYY-MM" is the month the deprecation is announced, and "Category" is the category under which the change is described.
8-
- Kind: Deprecated -
9-
- Description: Human readable description of the change: Used in changelog, documentation etc.
10-
- RemovalDate: Earliest date when the element may be removed.
5+
- **Date:** Date when the element was marked as deprecated.
6+
- **Version:** Used to organize the ChangeLog. Use the format "YYYY-MM/Category", where "YYYY-MM" is the month the deprecation is announced, and "Category" is the category under which the change is described.
7+
- **Kind:** Deprecated
8+
- **Description:** Human readable description of the change. Used in ChangeLog, documentation, etc.
9+
- **RemovalDate:** Earliest date when the element can be removed.
1110

12-
The annotation can be applied to a type, an entity set, a singleton,a property, a
13-
navigation property, a function or an action. If a type is marked as deprecated, it
11+
The annotation can be applied to a type, an entity set, a singleton, a property, a
12+
navigation property, a function, or an action. If a type is marked as deprecated, it
1413
is not necessary to mark the members of that type as deprecated, nor is it necessary
1514
to annotate any usages of that type.
1615

17-
**Example of property annotation:**
16+
## Example of property annotation
1817

1918
```xml
2019
<EntityType Name="outlookTask" BaseType="Microsoft.OutlookServices.outlookItem" ags:IsMaster="true" ags:WorkloadName="Task" ags:EnabledForPassthrough="true">
@@ -32,15 +31,13 @@ to annotate any usages of that type.
3231
</EntityType>
3332
```
3433

35-
When the request URL contains a reference to a deprecated model element, the gateway will add a [Deprecation
36-
header](https://tools.ietf.org/html/draft-dalal-deprecation-header-02) (with the
37-
date the element was marked as deprecated) and a Sunset header (with the date of 2
38-
years beyond the Deprecation date) to the response.
34+
When the request URL contains a reference to a deprecated model element, the gateway adds a [Deprecation header](https://tools.ietf.org/html/draft-dalal-deprecation-header-02) (with the date the element was marked as deprecated) and a Sunset header (with the date of two years beyond the deprecation date) to the response.
3935

40-
**Deprecation header example:**
36+
## Deprecation header example
4137

42-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43-
Deprecation: Wed, 30 Mar 2022 11:59:59 GMT
44-
Sunset: Thursday, 30 June 2024 23:59:59 GMT
45-
Link: https://docs.microsoft.com/en-us/graph/changelog#2022-03-30_name ; rel="deprecation"; type="text/html"; title="name",https://docs.microsoft.com/en-us/graph/changelog#2022-03-30_state ; rel="deprecation"; type="text/html"; title="state"
46-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38+
```
39+
Deprecation: Wed, 30 Mar 2022 11:59:59 GMT
40+
Sunset: Thursday, 30 June 2024 23:59:59 GMT
41+
Link: https://docs.microsoft.com/en-us/graph/changelog#2022-03-30_name ; rel="deprecation"; type="text/html"; title="name",https://docs.microsoft.com/en-us/graph/changelog#2022-03-30_state ; rel="deprecation"; type="text/html"; title="state"
42+
43+
```

graph/patterns/dictionary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Before using a dictionary type in your API definition, make sure that your scena
2424

2525
### Alternatives
2626

27-
- [Open extensions](https://docs.microsoft.com/en-us/graph/extensibility-open-users) when you want to provide clients the ability to extend Microsoft Graph.
28-
- [Complex types](https://docs.microsoft.com/en-us/odata/webapi/complextypewithnavigationproperty) when the set of data values are known.
27+
- [Open extensions](https://docs.microsoft.com/graph/extensibility-open-users) when you want to provide clients the ability to extend Microsoft Graph.
28+
- [Complex types](https://docs.microsoft.com/odata/webapi/complextypewithnavigationproperty) when the set of data values are known.
2929

3030
## Issues and considerations
3131

graph/patterns/facets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In this solution, a child variant is identified by the presence of one or more f
1919

2020
The facet pattern is useful when there is a number of variants and they are not mutually exclusive. It also makes it syntactically easier to query resources by using OData $filter expression because it doesn't require casting.
2121

22-
You can consider related patterns such as [Type hierarchy](https://github.com/microsoft/api-guidelines/tree/graph/graph) and [Flat bag of properties](https://github.com/microsoft/api-guidelines/tree/graph/graph).
22+
You can consider related patterns such as [Type hierarchy](./subtypes.md) and Flat bag of properties.
2323

2424
## Issues and considerations
2525

graph/patterns/namespace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ We recommend that a new namespace be aligned with a top-level API category.
3838

3939
- Microsoft Graph consistency requirements discourage using the same type names for different concepts even within different namespaces. Microsoft Graph type names must be descriptive and unique within the API surface without requiring full qualification.
4040

41-
- A namespace must be consistent with an API category in the navigation path according to [Microsoft Graph REST API Guidelines](GuidelinesGraph.md#uniform-resource-locators-urls).
41+
- A namespace must be consistent with an API category in the navigation path according to [Microsoft Graph REST API Guidelines](../GuidelinesGraph.md#uniform-resource-locators-urls).
4242

4343
- When type name is ambiguous and requires a namespace qualifier, changing a namespace is a breaking change.
4444

graph/patterns/subtypes.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ subtype for each variant of the resource. In the hierarchy, the interdependencie
2020
## When to use this pattern
2121

2222
Use this pattern where each variant of a common concept has its own unique properties and behaviors,
23-
no combination of variants is anticipated,
24-
and it is acceptable that callers who need to query resources by variant are adequately served by filtering or partitioning using type casting.
23+
no combination of variants is anticipated, and it is acceptable that callers who need to query resources by variant are adequately served by filtering or partitioning using type casting.
2524

26-
Related patterns are
27-
[Facets](facets.md) and
28-
[Flat bag of properties](flatbag.md).
25+
Related patterns are [Facets](./facets.md) and Flat bag of properties.
2926

3027
## Issues and considerations
3128

0 commit comments

Comments
 (0)