Skip to content

$expand is reported as enum while it is actually string #197

Closed

Description

Current behavior:
$expand is enum.

Expected behavior:
$expand is string because you can have complex expressions in $expand like for example $expand=Groups($expand=Members)

Activity

  1. darrelmiller commented on Aug 18, 2022

    @darrelmiller
    Member

    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.

              schema:
                uniqueItems: true
                type: array
                items:
                  anyOf:
                    - enum:
                        - '*'
                        - serviceAnnouncement
                    - type: string

    Thoughts?

  2. baywet commented on Feb 29, 2024

    @baywet
    Member

    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.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.

  3. added
    type:bugA broken experience
    priority:p0Blocking issue/ loss of critical functions. An ICM may be filed to communicate urgency. SLA<=48hrs
    and removed
    status:needs-discussionAn issue that requires more discussion internally before resolving
    on Feb 29, 2024
  4. baywet commented on Feb 29, 2024

    @baywet
    Member

    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)

  5. andrueastman commented on Feb 29, 2024

    @andrueastman
    Contributor

    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.

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

priority:p0Blocking issue/ loss of critical functions. An ICM may be filed to communicate urgency. SLA<=48hrstype:bugA broken experience

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions