2
2
3
3
Microsoft Graph API Design Pattern
4
4
5
- ### * The Namespace provides the ability to organize resource definitions together into a logical set.*
5
+ * The Namespace provides the ability to organize resource definitions together into a logical set.*
6
6
7
7
## Problem
8
8
9
+ ---
9
10
When building a complex offering API designers may need to model many different
10
11
resources and their relationships. For better user experience and
11
12
discoverability related API elements need to be grouped together.
12
13
13
14
14
15
## Solution
15
16
17
+ ---
16
18
API designers can use the Namespace attribute of the CSDL schema to declare a
17
19
namespace and logically organize related API entities in the Graph metadata.
18
20
@@ -32,6 +34,7 @@ name. For consistent user experience namespaces MUST be aligned with the corresp
32
34
33
35
## When to Use this Pattern
34
36
37
+ ---
35
38
API resource grouping creates a user-friendly experience keeping all resources
36
39
for a specific feature close together
37
40
and limits the length of IDE prompts such as auto-complete in some programming languages.
@@ -40,6 +43,7 @@ We recommend that a new namespace should be aligned with top-level API category.
40
43
41
44
## Issues and Considerations
42
45
46
+ ---
43
47
1. Microsoft Graph consistency requirements discourage using the same type
44
48
names for different concepts even within different namespaces. Microsoft
45
49
Graph type names must be descriptive and unique within the API
@@ -70,6 +74,7 @@ We recommend that a new namespace should be aligned with top-level API category.
70
74
71
75
## Examples
72
76
77
+ ---
73
78
### Namespace and type declarations:
74
79
75
80
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
0 commit comments