-
Notifications
You must be signed in to change notification settings - Fork 957
[Migration-Check]sdk/resourcemanager/search/armsearch #25885
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
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 pull request represents a migration of the Azure Search SDK for Go from the AutoRest code generator to the new Go Code Generator. The changes update code generation comments, API signatures, and parameter naming conventions while maintaining the same underlying functionality.
Changes:
- Updated code generation headers from "AutoRest Code Generator" to "Go Code Generator"
- Changed parameter naming and types across API methods (e.g.,
SearchManagementRequestOptions→ManagementRequestOptions, pointer types to value types) - Reordered URL path parameter validation in request creation methods
- Updated import statements to use v2 module version in example files
- Added new metadata files (
version.go,tsp-location.yaml,testdata/_metadata.json)
Reviewed changes
Copilot reviewed 50 out of 51 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
version.go |
New file defining module name and version constants |
tsp-location.yaml |
New TypeSpec configuration file for SDK regeneration |
testdata/_metadata.json |
New test metadata with API version and emitter version |
time_rfc3339.go |
Updated code generation header |
responses.go |
Updated type names and code generation header |
usages_client.go |
Changed parameter types from pointer to value, reordered validations |
sharedprivatelinkresources_client.go |
Changed parameter naming, reordered validations, removed FinalStateVia |
services_client.go |
Changed parameter naming, reordered validations, removed FinalStateVia |
privatelinkresources_client.go |
Changed parameter naming and improved paging logic |
*_example_test.go files |
Updated imports to v2, removed unnecessary parameters, simplified API calls |
querykeys_client_example_test.go |
Reordered example functions for better logical flow |
| // - options - UsagesClientListBySubscriptionOptions contains the optional parameters for the UsagesClient.NewListBySubscriptionPager | ||
| // method. | ||
| func (client *UsagesClient) NewListBySubscriptionPager(location string, searchManagementRequestOptions *SearchManagementRequestOptions, options *UsagesClientListBySubscriptionOptions) *runtime.Pager[UsagesClientListBySubscriptionResponse] { | ||
| func (client *UsagesClient) NewListBySubscriptionPager(location string, params ManagementRequestOptions, options *UsagesClientListBySubscriptionOptions) *runtime.Pager[UsagesClientListBySubscriptionResponse] { |
Copilot
AI
Jan 15, 2026
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.
The params parameter type changed from a pointer (*SearchManagementRequestOptions) to a value type (ManagementRequestOptions). This is a breaking API change. If the parameter is optional (which seems likely given it contains an optional ClientRequestID field), it should remain a pointer type to allow callers to pass nil. Verify this matches the intended API design.
| // - options - SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the SharedPrivateLinkResourcesClient.BeginCreateOrUpdate | ||
| // method. | ||
| func (client *SharedPrivateLinkResourcesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, searchServiceName string, sharedPrivateLinkResourceName string, sharedPrivateLinkResource SharedPrivateLinkResource, searchManagementRequestOptions *SearchManagementRequestOptions, options *SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SharedPrivateLinkResourcesClientCreateOrUpdateResponse], error) { | ||
| func (client *SharedPrivateLinkResourcesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, searchServiceName string, sharedPrivateLinkResourceName string, resource SharedPrivateLinkResource, params ManagementRequestOptions, options *SharedPrivateLinkResourcesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SharedPrivateLinkResourcesClientCreateOrUpdateResponse], error) { |
Copilot
AI
Jan 15, 2026
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.
The params parameter type changed from a pointer to a value type. This is a breaking API change that could impact existing code. Consider whether this parameter should remain a pointer to maintain backward compatibility and allow nil values.
| // - options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability | ||
| // method. | ||
| func (client *ServicesClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, searchManagementRequestOptions *SearchManagementRequestOptions, options *ServicesClientCheckNameAvailabilityOptions) (ServicesClientCheckNameAvailabilityResponse, error) { | ||
| func (client *ServicesClient) CheckNameAvailability(ctx context.Context, body CheckNameAvailabilityInput, params ManagementRequestOptions, options *ServicesClientCheckNameAvailabilityOptions) (ServicesClientCheckNameAvailabilityResponse, error) { |
Copilot
AI
Jan 15, 2026
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.
The params parameter type changed from a pointer to a value type. This breaking change affects all service methods. Verify this is intentional and aligns with the SDK's design guidelines for optional parameters.
generation based on branch
migration/search