OpenAPI.NET.OData icon indicating copy to clipboard operation
OpenAPI.NET.OData copied to clipboard

Duplicate operation Ids

Open timayabi2020 opened this issue 1 year ago • 2 comments

As reported here https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2843, some duplicate operation ids were detected. This violates a rule on operation ids as per the description in the Open Api spec. https://spec.openapis.org/oas/v3.0.3

timayabi2020 avatar Jul 25 '24 09:07 timayabi2020

Feedback: https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2843#issuecomment-2293027396

irvinesunday avatar Aug 16 '24 08:08 irvinesunday

@irvinesunday I've responded on the main issue. However, we can continue with this thread over here since it's an internal issue.

On the latest metadata pull we have users.GetPhotos and users.GetPhoto as shown in the image below. Image

Image

For PowerShell open Api referesh process, a singularizeOperationIds query parameter is passed to the DevX service used to slice the file based on tags and responds with a new open Api file. When that particular function is applied, we end up having the same operation Id assigned to two different paths. i.e. users.GetPhotos ends up being users.GetPhoto. This is just an example of the call we make to Devx Api for slicing the open Api file. https://devxapi-func-prod-eastus.azurewebsites.net/$openapi?tags=^deviceManagement.Functions$&title=DeviceManagement.Functions&openapiversion=3&style=Powershell&fileName=powershell_v2&graphVersion=v1.0&singularizeOperationIds=true

timayabi2020 avatar Nov 13 '24 08:11 timayabi2020