msgraph-metadata icon indicating copy to clipboard operation
msgraph-metadata copied to clipboard

Missing key UserExtend for Enum AccessPackageRequestType

Open shemogumbe opened this issue 6 months ago • 0 comments

Fixes https://github.com/microsoftgraph/msgraph-sdk-python/issues/838

Raised in python, the missing key UserExtend for Enum AccessPackageRequestType affects all SDKs.

While generation is fine , it maps the enum definition in the OpenAPI file:

microsoft.graph.accessPackageRequestType:
      title: accessPackageRequestType
      enum:
        - notSpecified
        - userAdd
        - userUpdate
        - userRemove
        - adminAdd
        - adminUpdate
        - adminRemove
        - systemAdd
        - systemUpdate
        - systemRemove
        - onBehalfAdd
        - unknownFutureValue
      type: string

To the generated Python Enum Model as:

from enum import Enum

class AccessPackageRequestType(str, Enum):
    NotSpecified = "notSpecified",
    UserAdd = "userAdd",
    UserUpdate = "userUpdate",
    UserRemove = "userRemove",
    AdminAdd = "adminAdd",
    AdminUpdate = "adminUpdate",
    AdminRemove = "adminRemove",
    SystemAdd = "systemAdd",
    SystemUpdate = "systemUpdate",
    SystemRemove = "systemRemove",
    OnBehalfAdd = "onBehalfAdd",
    UnknownFutureValue = "unknownFutureValue",

More Details The openapi.yaml shows that UserExtend exists in the description, but it does not exist in the definition as shown above. image

Workload owner or metadata update required Checking the description, seems the key has not been added by the workload owner as well: image (1)

Solution Adding this will automatically solve this for all SDKs.

shemogumbe avatar Aug 12 '24 10:08 shemogumbe