-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Migrate Azure.AI.AnomalyDetector to new generator #55563
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Migrates Azure.AI.AnomalyDetector to the new TypeSpec-based C# generator/emitter and updates the generated client/model code accordingly, aligning the SDK with the repository’s newer generation pipeline.
Changes:
- Switched
tsp-location.yamlto use the new TypeSpec C# emitter package reference. - Regenerated protocol clients (Univariate/Multivariate), models, paging helpers, and internal serialization/pipeline utilities.
- Removed legacy generated model/serialization files and legacy build settings (AutoRest dependency).
Reviewed changes
Copilot reviewed 3 out of 100 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/anomalydetector/Azure.AI.AnomalyDetector/tsp-location.yaml | Points the package at the new TypeSpec HTTP client C# emitter package. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Univariate.RestClient.cs | New generated request-building methods for Univariate endpoints. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/TimeSeriesPoint.cs | Removes legacy generated model (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/TimeSeriesPoint.Serialization.cs | Removes legacy serialization implementation for TimeSeriesPoint. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/MultivariateLastDetectionResult.cs | Removes legacy generated model (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/MultivariateDetectionResult.cs | Removes legacy generated model (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/MultivariateBatchDetectionOptions.Serialization.cs | Removes legacy serialization implementation (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Multivariate.RestClient.cs | New generated request-building methods for Multivariate endpoints. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/VariableValues.cs | Regenerated model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/VariableState.cs | Regenerated model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/UnivariateLastDetectionResult.cs | Regenerated model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/UnivariateDetectionOptions.cs | Regenerated request model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/UnivariateChangePointDetectionResult.cs | Regenerated response model (collection types changed in this PR). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/UnivariateChangePointDetectionOptions.cs | Regenerated request model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/TimeSeriesPoint.cs | New generated model location under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/TimeSeriesPoint.Serialization.cs | New generated serialization implementation under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/TimeGranularity.cs | Regenerated extensible enum pattern (constructors/implicit ops updated). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/MultivariateLastDetectionResult.cs | New generated model location under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/MultivariateLastDetectionOptions.cs | Regenerated request model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/MultivariateDetectionResult.cs | New generated model location under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/MultivariateBatchDetectionStatus.cs | Regenerated extensible enum pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/MultivariateBatchDetectionResultSummary.cs | Regenerated response model (collection types changed in this PR). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/MultivariateBatchDetectionOptions.cs | Regenerated request model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/MultivariateBatchDetectionOptions.Serialization.cs | New generated serialization implementation under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ModelStatus.cs | Regenerated extensible enum pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ModelState.cs | Regenerated model (collection types changed in this PR). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ModelList.cs | New internal paging model for listing models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ModelList.Serialization.cs | Serialization for the new paging model ModelList. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ModelInfo.cs | Regenerated model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ImputeMode.cs | Regenerated extensible enum pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/FillNAMethod.cs | Regenerated extensible enum pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ErrorResponse.cs | New generated model location under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/ErrorResponse.Serialization.cs | New generated serialization under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/DiagnosticsInfo.cs | New generated model location under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/DiagnosticsInfo.Serialization.cs | Updated serialization implementation to the newer IJsonModel pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/DataSchema.cs | Regenerated extensible enum pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/CorrelationChanges.cs | New generated model location under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/CorrelationChanges.Serialization.cs | New generated serialization under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AzureAIAnomalyDetectorContext.cs | Updates source-generation context references and buildable types. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AnomalyValue.cs | Regenerated model (collection types changed in this PR). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AnomalyState.cs | New generated model location under Generated/Models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AnomalyInterpretation.cs | Regenerated model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AnomalyDetectionModel.cs | Regenerated model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AlignPolicy.cs | Regenerated model with new “additional properties” pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AlignPolicy.Serialization.cs | Updated serialization implementation to newer IJsonModel pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Models/AlignMode.cs | Regenerated extensible enum pattern. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/Utf8JsonRequestContent.cs | Updates generated request content helper (partial class + docs tweaks). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/TypeFormatters.cs | New shared formatting helpers for query/path serialization. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/SerializationFormat.cs | New enum describing serialization formats for formatting helpers. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/RequestContextExtensions.cs | New helpers for RequestContext parsing. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/RawRequestUriBuilderExtensions.cs | New helpers for query construction/manipulation. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/Optional.cs | Updates Optional helpers (partial + minor signature ordering changes). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/ModelSerializationExtensions.cs | Refactors/updates serialization utilities for the new generator patterns. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/ErrorResult.cs | New response wrapper to throw stored RequestFailedException on Value. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/CodeGenTypeAttribute.cs | New generator customization attribute definitions. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/CodeGenSuppressAttribute.cs | New generator customization attribute definitions. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/CodeGenSerializationAttribute.cs | New generator customization attribute definitions. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/CodeGenMemberAttribute.cs | New generator customization attribute definitions. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/ClientPipelineExtensions.cs | New pipeline helpers for consistent error handling and HEAD-as-bool. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/ChangeTrackingList.cs | Updates change-tracking list helper (partial + docs tweaks). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/ChangeTrackingDictionary.cs | Updates change-tracking dictionary helper (partial + docs tweaks). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/CancellationTokenExtensions.cs | New helper to convert CancellationToken to RequestContext. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/Argument.cs | Updates argument helper (partial + removes some validation helpers). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/ErrorResponse.cs | Removes legacy generated model (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/ErrorResponse.Serialization.cs | Removes legacy generated serialization (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/DiagnosticsInfo.cs | Removes legacy generated model (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/CorrelationChanges.cs | Removes legacy generated model (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/CorrelationChanges.Serialization.cs | Removes legacy generated serialization (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/CollectionResults/MultivariateGetMultivariateModelsCollectionResultOfT.cs | New typed pageable helper for listing models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/CollectionResults/MultivariateGetMultivariateModelsCollectionResult.cs | New BinaryData pageable helper for listing models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/CollectionResults/MultivariateGetMultivariateModelsAsyncCollectionResultOfT.cs | New typed async pageable helper for listing models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/CollectionResults/MultivariateGetMultivariateModelsAsyncCollectionResult.cs | New BinaryData async pageable helper for listing models. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyState.cs | Removes legacy generated model (moved under Generated/Models). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClientOptions.cs | Regenerated client options (service version enum formatting updated). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClientBuilderExtensions.cs | Regenerated DI registration extensions (renamed + signature changed). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs | Regenerated top-level client wiring (endpoint/auth/pipeline/sub-clients). |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.RestClient.cs | New partial placeholder for REST-client separation. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Azure.AI.AnomalyDetector.csproj | Removes legacy AutoRest dependency flag to align with new generator. |
| sdk/anomalydetector/Azure.AI.AnomalyDetector/metadata.json | Adds generator metadata (apiVersion). |
sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs
Show resolved
Hide resolved
sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Multivariate.cs
Show resolved
Hide resolved
sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs
Outdated
Show resolved
Hide resolved
sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Univariate.cs
Show resolved
Hide resolved
sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs
Outdated
Show resolved
Hide resolved
sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 100 changed files in this pull request and generated 3 comments.
...ctor/src/Generated/CollectionResults/MultivariateGetMultivariateModelsCollectionResultOfT.cs
Show resolved
Hide resolved
sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/ClientPipelineExtensions.cs
Show resolved
Hide resolved
...malydetector/Azure.AI.AnomalyDetector/src/Generated/Internal/ModelSerializationExtensions.cs
Show resolved
Hide resolved
|
Can we run this script and check in the updates to the md file - https://github.com/Azure/azure-sdk-for-net/blob/main/doc/GeneratorMigration/Library_Inventory.ps1 |
|
Ah looks like there are merge conflicts in the inventory. Can you sync from main and re-run? |
Migrated Azure.AI.AnomalyDetector library and built with new generator
Addresses #55003