-
Notifications
You must be signed in to change notification settings - Fork 5k
Implement IJsonModel<> for Azure.Core.Expressions.DataFactory types #50807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
sdk/core/Azure.Core.Expressions.DataFactory/src/DataFactoryKeyVaultSecret.cs
Outdated
Show resolved
Hide resolved
sdk/core/Azure.Core.Expressions.DataFactory/tests/IJsonModelImplementationTests.cs
Outdated
Show resolved
Hide resolved
sdk/core/Azure.Core.Expressions.DataFactory/src/DataFactorySecret.Serialization.cs
Outdated
Show resolved
Hide resolved
…e tests Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
sdk/core/Azure.Core.Expressions.DataFactory/src/DataFactoryKeyVaultSecret.Serialization.cs
Outdated
Show resolved
Hide resolved
sdk/core/Azure.Core.Expressions.DataFactory/src/DataFactorySecret.cs
Outdated
Show resolved
Hide resolved
…constructors and PersistableModelProxy Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
@copilot Since we don't have warning suppression in this PR, update this PR description accordingly. |
Updated the PR description to reflect the current implementation. The description now accurately shows that internal parameterless constructors were added instead of warning suppressions, and the PersistableModelProxy attribute is used for DataFactorySecret polymorphic deserialization. |
...re/Azure.Core.Expressions.DataFactory/src/DataFactoryLinkedServiceReference.Serialization.cs
Outdated
Show resolved
Hide resolved
…del implementations Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
…l-forgiving operators Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
Can we update the ci.yml https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/ci.yml#L70 to include the DataFactory library in the AOT compat checks? |
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Added Azure.Core.Expressions.DataFactory to the AOT compatibility checks in ci.yml. Created the ExpectedAotWarnings.txt file (empty since the implementation is designed to be AOT-compatible). Commit ebdb288. |
…file Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
…e ci.yml Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
sdk/core/Azure.Core.Expressions.DataFactory/tests/compatibility/ExpectedAotWarnings.txt
Outdated
Show resolved
Hide resolved
Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
…ng variations Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
Updated ExpectedAotWarnings.txt with more flexible regex patterns to capture the 4 additional warnings reported. Made the SerializeGenericList and DeserializeAzureKeyVaultSecretReference patterns more flexible using wildcards to handle parameter variations. Commit 37c96ed. |
This PR implements the
IJsonModel<>
interface for the following types inAzure.Core.Expressions.DataFactory
:DataFactoryKeyVaultSecret
DataFactoryLinkedServiceReference
DataFactorySecret
DataFactorySecretString
Changes Made
Interface Implementation
IJsonModel<T>
andIPersistableModel<T>
interface declarations to all four typesIJsonModel<T>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IJsonModel<T>.Create(ref Utf8JsonReader, ModelReaderWriterOptions)
IPersistableModel<T>.Write(ModelReaderWriterOptions)
IPersistableModel<T>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<T>.GetFormatFromOptions(ModelReaderWriterOptions)
Implementation Details
IUtf8JsonSerializable.Write()
implementations for serializationDataFactoryContext.Default
for AOT compatibilityAPI Surface Updates
Azure.Core.Expressions.DataFactory.netstandard2.0.cs
andAzure.Core.Expressions.DataFactory.net8.0.cs
API filesCode Quality
Testing
IJsonModelImplementationTests
class validates the implementationThe implementation follows the established patterns used by
DataFactoryElement<T>
and maintains backward compatibility while adding the requested functionality.Fixes #50787.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.