Open peombwa opened 5 years ago
Discriminate based on @odata.type
as the propertyName
e.g. Group owners.
To support OpenType
entities, we need to:
Add an OpenAPI
discriminator object on the schema that is inherited from e.g. microsoft.graph.directoryObject
.
Ensure schemata that inherit from the base schema (microsoft.graph.directoryObject
) are present in the OpenAPI doc and have an AutoREST x-ms-discriminator-value
extension.
modified microsoft.graph.user schema.
modified microsoft.graph.group schema.
This generates a polymorphic type that returns appropriate types based on @odata.type
.
Reference:
cc @ddyett, @irvinesunday
We need to find out what is the capability annotation that can describe the set of derived types that are returned from a navigation property that points to a collection of baseType.
We should also consider implementing https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/1055 once discriminator support is available in the OpenAPI files.
will likely be addressed in V3 under Kiota.
ref:
AB#4988