@@ -22,7 +22,7 @@ namespace and logically organize related API entities in the Graph metadata.
22
22
</Schema >
23
23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
24
25
- A public namespace must have "microsoft.graph.” prefix and be presented in camel
25
+ A public namespace must have "microsoft.graph." prefix and be presented in camel
26
26
case, i.e microsoft.graph.myNamespace.
27
27
28
28
When type casting is required in the API query, request or response, a fully
@@ -36,8 +36,7 @@ API resource grouping creates a user-friendly experience keeping all resources
36
36
for a specific feature close together
37
37
and limits the length of IDE prompts such as auto-complete in some programming languages.
38
38
39
- We recommend creating a new namespace when a new top-level API category is
40
- introduced.
39
+ We recommend that a new namespace should be aligned with top-level API category.
41
40
42
41
## Issues and Considerations
43
42
@@ -60,12 +59,14 @@ introduced.
60
59
6. Cyclical references between namespaces are not allowed as many
61
60
object-oriented languages don’t support a cycles between namespaces.
62
61
63
- 7. Microsoft Graph has heuristic rules for declared namespaces:
62
+ 7. Microsoft Graph has some predefined constraints for declared namespaces:
64
63
65
- 1. All public namespaces must have a prefix ‘ microsoft.graph’
64
+ 1. All public namespaces must have a prefix " microsoft.graph"
66
65
67
- 2. If a namespace does not begin with ‘microsoft.graph’ prefix, all types
68
- in the schema will be coerced into the main ‘microsoft.graph’ namespace.
66
+ 2. Only one level of nesting deeper then "microsoft.graph" is supported
67
+
68
+ 3. If a namespace does not begin with "microsoft.graph" prefix, all types
69
+ in the schema will be coerced into the main "microsoft.graph" namespace.
69
70
70
71
## Examples
71
72
@@ -80,27 +81,26 @@ introduced.
80
81
</Schema >
81
82
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82
83
83
- Fully qualified type name: microsoft.graph.search.bookmark
84
+ Fully qualified type name: " microsoft.graph.search.bookmark"
84
85
85
86
### Managing multiple schemas:
86
87
87
88
Workloads must define schemas in their csdl using the Edmx format.
88
- [Microsoft.IC3.DataPlatform](https://dev.azure.com/msazure/One/_git/AD-AggregatorService-Workloads?path=%2FWorkloads%2FMicrosoft.IC3.DataPlatform%2Foverride%2Fschema-Prod-beta.csdl)
89
- is an example of a workload that exposes multiple namespaces.
89
+ Here is an example of a workload that exposes multiple namespaces.
90
90
91
91
**Tip:** As with schemas that exist in the microsoft.graph namespace, defining an
92
- entity type is optional, AGS will transform your schema to make all entity types
93
- derive from microsoft.graph.entity.
92
+ entity type is optional, by default your schema derives all entity types
93
+ from microsoft.graph.entity.
94
94
95
95
**Warning:** Do not deviate from the general structure in the example below.
96
96
Schema validation tool expects the XML structure (including xml namespace
97
97
declarations) to match the example below.
98
98
```XML
99
99
<?xml version =" 1.0" encoding =" utf-8" ?>
100
- <edmx : Edmx Version =" 4.0" xmlns : edmx =" http://docs.oasis-open.org/odata/ns/edmx" xmlns : ags = " http://aggregator.microsoft.com/internal " xmlns : odata =" http://schemas.microsoft.com/oDataCapabilities" >
100
+ <edmx : Edmx Version =" 4.0" xmlns : edmx =" http://docs.oasis-open.org/odata/ns/edmx" xmlns : odata =" http://schemas.microsoft.com/oDataCapabilities" >
101
101
<edmx : DataServices >
102
- <Schema Namespace =" microsoft.graph.callRecords" xmlns =" http://docs.oasis-open.org/odata/ns/edm" xmlns : ags = " http://aggregator.microsoft.com/internal " xmlns : odata =" http://schemas.microsoft.com/oDataCapabilities" >
103
- <EntityType Name =" callRecord" ags : IsOwner = " true " ags : AddressUrl = " https://plat.teams.microsoft.com " >
102
+ <Schema Namespace =" microsoft.graph.callRecords" xmlns =" http://docs.oasis-open.org/odata/ns/edm" xmlns : odata =" http://schemas.microsoft.com/oDataCapabilities" >
103
+ <EntityType Name =" callRecord" >
104
104
<Key >
105
105
<PropertyRef Name =" id" />
106
106
</Key >
0 commit comments