MSGraph-SDK-Code-Generator icon indicating copy to clipboard operation
MSGraph-SDK-Code-Generator copied to clipboard

Reference delete scenario is not supported by the SDK

Open zengin opened this issue 4 years ago • 1 comments

There is no generated code available to support:

DELETE /groups/{id}/acceptedSenders/$ref?$id=https://graph.microsoft.com/v1.0/users/{user-id}

https://docs.microsoft.com/en-us/graph/api/group-delete-acceptedsenders?view=graph-rest-1.0&tabs=csharp AB#8405

zengin avatar Mar 03 '21 02:03 zengin

It should fix it since we have the request builder for it. https://github.com/microsoftgraph/msgraph-sdk-go/blob/main/groups/item/acceptedsenders/ref/ref_request_builder.go

However there does seem to be a bug in the conversion process. https://github.com/microsoft/OpenAPI.NET.OData/issues/128

baywet avatar Nov 17 '21 19:11 baywet

@andrueastman it looks like the snippet is still not being generated for this one. To me this is either an issue in the conversion process (path segments are not being projected) or in the snippets generation. Can you validate that specific path is in the description? Based on that, we'll transfer the issue.

baywet avatar Nov 27 '23 14:11 baywet

@baywet The snippet fails to generate here because there is no DELETE method for /groups/{group-id}/acceptedSenders/$ref (only GET and POST). The DELETE method, however does exist on the path /groups/{group-id}/acceptedSenders/{directoryObject-id}/$ref as is the expectation with this issue where it's added on the item and not on the collection.

There may be a conversion issue or a missing annotation that we would need to investigate so that the operation appears on the collection with the relevant query parameter as shown in the snippet.

andrueastman avatar Nov 27 '23 16:11 andrueastman

Thanks for reverting here. I was referring to the first case. Do you think we should transfer this to the metadata repo then?

baywet avatar Nov 27 '23 17:11 baywet

After looking into this abit more, this is probably a conversion library issue given the original work/issue here and the PR here the conversion library looks like it will only add the DELETE operation on the key segment but not on a collection valued one like in the example ~/entityset/{key}/collection-valued-Nav/$ref?$id ={navKey}

If, it's okay, I'll close this for now and we can follow this one up at https://github.com/microsoft/OpenAPI.NET.OData/issues/453 as this one looks to definitely need conversion library support.

andrueastman avatar Nov 28 '23 06:11 andrueastman