Use ModelReaderWriter for Azure.Search.Documents#51558
Merged
ShivangiReja merged 15 commits intoAzure:mainfrom Aug 4, 2025
Merged
Use ModelReaderWriter for Azure.Search.Documents#51558ShivangiReja merged 15 commits intoAzure:mainfrom
ShivangiReja merged 15 commits intoAzure:mainfrom
Conversation
|
Thank you for your contribution @sbomer! We will review the pull request and get back to you soon. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Some models were generated with the same C# class, causing a race condition when the generator tried to write the same file twice. This uses `remove-model` to remove the old versions of these models. Some generated code has been moved into custom classes to ensure we keep the mapping of the old and new model name to the same C# type on the deserialization path. Uses `CodeGenSerialization` attribute to include generated deserialization code for bufferSize, which was defined by the old model.
Contributor
Author
|
@ShivangiReja @m-nash PTAL, I think this is ready to go. |
m-nash
reviewed
Aug 4, 2025
sdk/search/Azure.Search.Documents/src/Models/AzureSearchDocumentsContext.Custom.cs
Show resolved
Hide resolved
This class is now generated
ShivangiReja
reviewed
Aug 4, 2025
ShivangiReja
reviewed
Aug 4, 2025
sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs
Show resolved
Hide resolved
ShivangiReja
approved these changes
Aug 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates to use the ModelReaderWriter option in autorest.md,
and updates generated code and references to it.
This required an additional fix to work around incorrect use of
the codegen attributes:
causing a race condition when the generator tried to
write the same file twice.
remove-modelto remove the old versionsof these models. Some generated code has been moved
into custom classes to ensure we keep the mapping of
the old and new model name to the same C# type on
the deserialization path.
CodeGenSerializationattribute to includegenerated deserialization code for bufferSize, which
was defined by the old model.
This should fix the merging introduced by #12302
and identified as a problem in #12303.
@m-nash PTAL