[Refresh] Regenerate search Go SDK with latest TypeSpec#26173
[Refresh] Regenerate search Go SDK with latest TypeSpec#26173
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
|
PR base on main branch from swagger tag: package-2025-05 |
| - Function `*SharedPrivateLinkResourcesClient.NewListByServicePager` parameter(s) have been changed from `(resourceGroupName string, searchServiceName string, searchManagementRequestOptions *SearchManagementRequestOptions, options *SharedPrivateLinkResourcesClientListByServiceOptions)` to `(resourceGroupName string, searchServiceName string, options *SharedPrivateLinkResourcesClientListByServiceOptions)` | ||
| - Function `*UsagesClient.NewListBySubscriptionPager` parameter(s) have been changed from `(location string, searchManagementRequestOptions *SearchManagementRequestOptions, options *UsagesClientListBySubscriptionOptions)` to `(location string, options *UsagesClientListBySubscriptionOptions)` | ||
| - Struct `SearchManagementRequestOptions` has been removed | ||
|
|
|
we need to add migration guide in the changelog, waiting for this PR merged: #26217 |
There was a problem hiding this comment.
Pull request overview
Automated refresh of the armsearch resource manager SDK, regenerating the package from the latest TypeSpec definitions and moving the module to a v2 (major) version.
Changes:
- Regenerated ARM Search clients/models/options/examples and fake servers using the TypeSpec Go generator.
- Bumped the Go module to
.../armsearch/v2and updated dependencies (e.g.,azcore). - Removed legacy AutoRest artifacts (
autorest.md,build.go) and the custom RFC3339 time helper in favor of shared datetime support.
Reviewed changes
Copilot reviewed 47 out of 49 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/resourcemanager/search/armsearch/version.go | Adds generator version constants for the module. |
| sdk/resourcemanager/search/armsearch/usages_client_example_test.go | Updates examples to v2 import path and new method signatures. |
| sdk/resourcemanager/search/armsearch/usages_client.go | Regenerated Usages client; updates options/header handling and pager signature. |
| sdk/resourcemanager/search/armsearch/tsp-location.yaml | Adds TypeSpec location metadata for regeneration. |
| sdk/resourcemanager/search/armsearch/time_rfc3339.go | Removes legacy AutoRest RFC3339 helper. |
| sdk/resourcemanager/search/armsearch/testdata/_metadata.json | Adds emitter metadata for testdata generation. |
| sdk/resourcemanager/search/armsearch/sharedprivatelinkresources_client_example_test.go | Updates examples to v2 import path and new signatures/poller usage. |
| sdk/resourcemanager/search/armsearch/sharedprivatelinkresources_client.go | Regenerated SharedPrivateLinkResources client; signature/options changes and headers. |
| sdk/resourcemanager/search/armsearch/search_live_test.go | Updates live tests to import the v2 module path. |
| sdk/resourcemanager/search/armsearch/responses.go | Regenerated response wrapper types and docs. |
| sdk/resourcemanager/search/armsearch/querykeys_client_example_test.go | Updates examples to v2 import path; adds/adjusts examples per latest spec. |
| sdk/resourcemanager/search/armsearch/querykeys_client.go | Regenerated QueryKeys client; signature/options changes and header wiring. |
| sdk/resourcemanager/search/armsearch/privatelinkresources_client_example_test.go | Updates examples to v2 import path and new pager options signature. |
| sdk/resourcemanager/search/armsearch/privatelinkresources_client.go | Regenerated PrivateLinkResources client; pager implementation updated. |
| sdk/resourcemanager/search/armsearch/privateendpointconnections_client_example_test.go | Updates examples to v2 import path; reorders/adds examples. |
| sdk/resourcemanager/search/armsearch/privateendpointconnections_client.go | Regenerated PrivateEndpointConnections client; signature/options and headers. |
| sdk/resourcemanager/search/armsearch/options.go | Regenerated option structs; replaces removed SearchManagementRequestOptions with per-operation options. |
| sdk/resourcemanager/search/armsearch/operations_client.go | Regenerated Operations client; pager updated to use nextLink. |
| sdk/resourcemanager/search/armsearch/networksecurityperimeterconfigurations_client_example_test.go | Updates examples to v2 import path; adds Get example and updates outputs. |
| sdk/resourcemanager/search/armsearch/networksecurityperimeterconfigurations_client.go | Regenerated NSP configurations client; signature/options and poller options updated. |
| sdk/resourcemanager/search/armsearch/models_serde.go | Regenerated serde; switches to shared datetime helpers and adds nextLink marshal/unmarshal. |
| sdk/resourcemanager/search/armsearch/management_client_example_test.go | Updates example imports to v2 module path. |
| sdk/resourcemanager/search/armsearch/management_client.go | Regenerated Management client; signature/options changes. |
| sdk/resourcemanager/search/armsearch/go.sum | Updates dependency checksums (e.g., azcore + golang.org/x/*). |
| sdk/resourcemanager/search/armsearch/go.mod | Bumps module path to /v2 and updates dependencies. |
| sdk/resourcemanager/search/armsearch/fake/usages_server.go | Regenerated fake server for Usages client; signature/options updates. |
| sdk/resourcemanager/search/armsearch/fake/sharedprivatelinkresources_server.go | Regenerated fake server; signature/options updates. |
| sdk/resourcemanager/search/armsearch/fake/services_server.go | Regenerated fake server; signature/options updates and parameter renames. |
| sdk/resourcemanager/search/armsearch/fake/server_factory.go | Updates server factory to new initServer helper signature. |
| sdk/resourcemanager/search/armsearch/fake/querykeys_server.go | Regenerated fake server; signature/options updates. |
| sdk/resourcemanager/search/armsearch/fake/privatelinkresources_server.go | Regenerated fake server; pager nextLink injection updated. |
| sdk/resourcemanager/search/armsearch/fake/privateendpointconnections_server.go | Regenerated fake server; signature/options updates. |
| sdk/resourcemanager/search/armsearch/fake/operations_server.go | Regenerated fake server; pager nextLink injection updated. |
| sdk/resourcemanager/search/armsearch/fake/networksecurityperimeterconfigurations_server.go | Regenerated fake server; path parsing updates. |
| sdk/resourcemanager/search/armsearch/fake/management_server.go | Regenerated fake server; signature/options updates. |
| sdk/resourcemanager/search/armsearch/fake/internal.go | Adds new initServer helper for fake server transport initialization. |
| sdk/resourcemanager/search/armsearch/fake/adminkeys_server.go | Regenerated fake server; signature/options updates. |
| sdk/resourcemanager/search/armsearch/constants.go | Regenerated constants/enums; removes module constants and updates enum values/docs. |
| sdk/resourcemanager/search/armsearch/client_factory.go | Regenerated client factory comment for subscription ID parameter. |
| sdk/resourcemanager/search/armsearch/build.go | Removes AutoRest regeneration entrypoint. |
| sdk/resourcemanager/search/armsearch/autorest.md | Removes legacy AutoRest configuration. |
| sdk/resourcemanager/search/armsearch/adminkeys_client_example_test.go | Updates AdminKeys examples to v2 import path and new signatures. |
| sdk/resourcemanager/search/armsearch/adminkeys_client.go | Regenerated AdminKeys client; signature/options updates and header wiring. |
| sdk/resourcemanager/search/armsearch/README.md | Updates install instructions to the v2 module path. |
| sdk/resourcemanager/search/armsearch/CHANGELOG.md | Adds v2.0.0 release notes documenting breaking changes and new option fields. |
| // Manager API or the portal. | ||
| // - subscriptionID - The ID of the target subscription. The value must be an UUID. | ||
| // - credential - used to authorize requests. Usually a credential from azidentity. | ||
| // - options - pass nil to accept the default values. |
There was a problem hiding this comment.
The NewClientFactory doc comment still says “options - pass nil to accept the default values.” while the regenerated clients in this PR have been updated to the more descriptive wording (“Contains optional client configuration. Pass nil…”). Consider updating this line too so the public docs are consistent across the package.
| // - options - pass nil to accept the default values. | |
| // - options - Contains optional client configuration. Pass nil to accept the default values. |
| const ( | ||
| moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch" | ||
| moduleVersion = "v2.0.0" |
There was a problem hiding this comment.
moduleName should match the Go module path for v2 packages (i.e., include the /v2 suffix). Right now it’s .../armsearch while go.mod declares .../armsearch/v2, which can lead to incorrect user-agent/telemetry metadata when constructing arm.NewClient (it uses moduleName/moduleVersion). Update moduleName to include /v2 to align with the module path.
| directory: specification/search/resource-manager/Microsoft.Search/Search | ||
| commit: 402bf21e472d87c1b3abcd0b2675a8b6c8a42700 | ||
| repo: i-specs |
There was a problem hiding this comment.
In tsp-location.yaml, repo is set to i-specs, but other ARM TypeSpec SDKs in this repo use repo: Azure/azure-rest-api-specs. Using a different repo identifier is likely to break the documented “browse to URL/commit” shortcut and may break tooling that assumes the standard repo value. Please switch this to Azure/azure-rest-api-specs (or whatever the repo tooling expects here) for consistency with the rest of sdk/resourcemanager/*/tsp-location.yaml files.
|
@jliusan please help process this PR and add this doc into changelog, to help user adopt the breaking changes |

Automated regeneration of the
searchGo SDK using the latest TypeSpec definitions.