msgraph-sdk-powershell
msgraph-sdk-powershell copied to clipboard
Duplicated operaionId
Describe the bug
Multiple Open API spec has duplicated operaionId
For example: https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/dev/openApiDocs/v1.0/Users.yml
'/users/{user-id}/photo':
get:
tags:
- users.profilePhoto
summary: Get photo from users
description: The user's profile photo. Read-only.
operationId: user_GetPhoto
parameters:
- name: user-id
'/users/{user-id}/photos/{profilePhoto-id}':
get:
tags:
- users.profilePhoto
summary: Get photos from users
description: The collection of the user's profile photos in different sizes. Read-only.
operationId: user_GetPhoto
parameters:
- name: user-id
When user import Open API spec into product/service. Like Azure API Management will cause conflict
Expected behavior
OperationId should unique.
How to reproduce
- Create Azure API Management service
- Click API, create API from defination
- Paste Open API spec URL, fill the form then press Create
SDK Version
v1.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
@dinowang thanks a lot for identifying this issue. Indeed, this is a violation based on Open Api spec description. https://spec.openapis.org/oas/v3.0.3. I am transferring this issue to the team responsible so that they work on it.
From the OpenAPI spec. the two paths have different operation ids. See below:
users_GetPhoto - link
users_GetPhotos - link
@irvinesunday for the last one i.e users_GetPhotos there is the singularization function which ends up singularizing the operation id. I think having the tag as users_GetPhotoById should resolve this issue.