-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[NewRelic] SDK validation for TypeSpec swagger #53254
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
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
This PR updates the Azure NewRelic Observability SDK to use the latest TypeSpec swagger specification, upgrading from package version 2024-03-01 to 2025-05-01-preview.
- Updates autorest configuration file with new API version and model mappings
- Adds custom model factory methods for backward compatibility
- Updates API surfaces to reflect changes in type specifications
- Includes a directive to handle MonitoredSubscription model generation
Reviewed Changes
Copilot reviewed 6 out of 103 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Azure.ResourceManager.NewRelicObservability.Tests.csproj | Adds placeholder folder for generated samples |
| autorest.md | Updates API version, adds model mappings, enables debug mode, and includes directive for MonitoredSubscription |
| ArmNewRelicObservabilityModelFactory.cs | Adds custom model factory methods for backward compatibility |
| API surface files (.netstandard2.0/.net8.0) | Updates type signatures from string to typed identifiers and renames ResubscribeProperties |
| CHANGELOG.md | Documents API version update |
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityMonitoringStatus? monitoringStatus = null, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string marketplaceSubscriptionId = null, NewRelicAccountProperties newRelicAccountProperties = null, NewRelicObservabilityUserInfo userInfo = null, NewRelicPlanDetails planData = null, NewRelicLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, NewRelicObservabilityOrgCreationSource? orgCreationSource = null, NewRelicObservabilityAccountCreationSource? accountCreationSource = null, string subscriptionState = null, string saaSAzureSubscriptionStatus = null) | ||
| { | ||
| return NewRelicMonitorResourceData(id, name, resourceType, systemData, tags, location, identity, provisioningState, monitoringStatus, marketplaceSubscriptionStatus, marketplaceSubscriptionId, newRelicAccountProperties, userInfo, planData, saaSResourceId: default, liftrResourceCategory, liftrResourcePreference, orgCreationSource, accountCreationSource); |
Copilot
AI
Oct 16, 2025
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.
[nitpick] The method call is extremely long with many parameters. Consider breaking this into multiple lines with proper parameter alignment for better readability.
| return NewRelicMonitorResourceData(id, name, resourceType, systemData, tags, location, identity, provisioningState, monitoringStatus, marketplaceSubscriptionStatus, marketplaceSubscriptionId, newRelicAccountProperties, userInfo, planData, saaSResourceId: default, liftrResourceCategory, liftrResourcePreference, orgCreationSource, accountCreationSource); | |
| return NewRelicMonitorResourceData( | |
| id, | |
| name, | |
| resourceType, | |
| systemData, | |
| tags, | |
| location, | |
| identity, | |
| provisioningState, | |
| monitoringStatus, | |
| marketplaceSubscriptionStatus, | |
| marketplaceSubscriptionId, | |
| newRelicAccountProperties, | |
| userInfo, | |
| planData, | |
| saaSResourceId: default, | |
| liftrResourceCategory, | |
| liftrResourcePreference, | |
| orgCreationSource, | |
| accountCreationSource | |
| ); |
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource) | ||
| { | ||
| return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: default, saaSAzureSubscriptionStatus: default); |
Copilot
AI
Oct 16, 2025
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.
[nitpick] This method call spans an extremely long single line with numerous parameters. Break this into multiple lines with proper indentation for better code readability and maintainability.
| return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: default, saaSAzureSubscriptionStatus: default); | |
| return NewRelicMonitorResourceData( | |
| id: id, | |
| name: name, | |
| resourceType: resourceType, | |
| systemData: systemData, | |
| tags: tags, | |
| location: location, | |
| identity: identity, | |
| provisioningState: provisioningState, | |
| monitoringStatus: monitoringStatus, | |
| marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, | |
| marketplaceSubscriptionId: marketplaceSubscriptionId, | |
| newRelicAccountProperties: newRelicAccountProperties, | |
| userInfo: userInfo, | |
| planData: planData, | |
| liftrResourceCategory: liftrResourceCategory, | |
| liftrResourcePreference: liftrResourcePreference, | |
| orgCreationSource: orgCreationSource, | |
| accountCreationSource: accountCreationSource, | |
| subscriptionState: default, | |
| saaSAzureSubscriptionStatus: default | |
| ); |
sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md
Outdated
Show resolved
Hide resolved
sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md
Outdated
Show resolved
Hide resolved
|
Hi @mzhongl524. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
|
Hi @mzhongl524. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing |
This is the SDK validation for NewRelic.
TSP link: Azure/azure-rest-api-specs#36442.
Changes:
Add renaming and directive in the autorest file
Add custom code
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.