Skip to content

Conversation

@erikmav
Copy link

@erikmav erikmav commented Mar 5, 2025

A common need for reusing objects from a GET to do a POST/PUT. See microsoft/kiota#3883 .

…operties - common need for reusing objects from a GET to do a POST/PUT
@erikmav erikmav requested a review from a team as a code owner March 5, 2025 22:17
@erikmav
Copy link
Author

erikmav commented Mar 5, 2025

This is a proposal implementation of the recommendation provided in microsoft/kiota#3883 and taken from production code used in an Entra/MSGraph related service. Notably there are no parallel PRs for other platforms (yet), I can provide those if this gets approved/committed.

/// This is useful to allow the model object to be reused to send to a POST or PUT call.
/// Do not use if you are using a sparse PATCH.
/// </summary>
void MakeSendable();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this to a public interface would be breaking change.
Maybe we should look into a solution similar to 9c33bbd where we update the serialization registry to return a serializer that will ignore the backing store.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examining alternate approaches. Microsot.Graph is not up to date with that commit, awaiting that to be completed.

@baywet baywet added the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label Mar 7, 2025
@erikmav erikmav marked this pull request as draft March 12, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants