You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
$expand is reported as enum while it is actually string #197
If we updated the schema to be like this it would allow us to provide a list of properties that are expandable but also indicate that each expand property could be a more complex syntax.
currently expand, orderby, select are projected as arrays of enums.
In all three cases this is wrong because of nested expands/selects and nested properties ordering
e.g. $expand=Groups($expand=Members) $select=manager($select=firstName) $orderBy=manager.firstName
projecting all possibilities for all sub-properties combinations would lead to huge and hard to read enums
projecting only the first level properties like today is constraining.
projecting only the first level sub-properties with a oneOf with a string (variation of what Darrel proposed) I believe will lead to confusion (is this only what's supported?), won't be useful for validation or code generation purposes.
I propose we simply project those three as arrays of strings instead. Which will have the additional benefit of making Microsoft Graph descriptions quite smaller too.
We do have a hard dependency on that though, GE relies on this to auto completion.
We need to tie this new behaviour to a conversion setting switch (true by default, false for GE) "EmitExpandSelectAndOrderByAsStrings" (or a better name)
I propose we simply project those three as arrays of strings instead. Which will have the additional benefit of making Microsoft Graph descriptions quite smaller too.
Activity
darrelmiller commentedon Aug 18, 2022
If we updated the schema to be like this it would allow us to provide a list of properties that are expandable but also indicate that each expand property could be a more complex syntax.
Thoughts?
baywet commentedon Feb 29, 2024
adding some more context here due to
microsoft/kiota#4265
microsoftgraph/msgraph-sdk-typescript#512
currently expand, orderby, select are projected as arrays of enums.
In all three cases this is wrong because of nested expands/selects and nested properties ordering
e.g.
$expand=Groups($expand=Members)$select=manager($select=firstName)$orderBy=manager.firstNameprojecting all possibilities for all sub-properties combinations would lead to huge and hard to read enums
projecting only the first level properties like today is constraining.
projecting only the first level sub-properties with a oneOf with a string (variation of what Darrel proposed) I believe will lead to confusion (is this only what's supported?), won't be useful for validation or code generation purposes.
I propose we simply project those three as arrays of strings instead. Which will have the additional benefit of making Microsoft Graph descriptions quite smaller too.
baywet commentedon Feb 29, 2024
We do have a hard dependency on that though, GE relies on this to auto completion.
We need to tie this new behaviour to a conversion setting switch (true by default, false for GE) "EmitExpandSelectAndOrderByAsStrings" (or a better name)
andrueastman commentedon Feb 29, 2024
+1