Skip to content

[Refresh] Regenerate search Go SDK with latest TypeSpec#26173

Open
tadelesh wants to merge 3 commits intomainfrom
refresh/search-latest-typespec
Open

[Refresh] Regenerate search Go SDK with latest TypeSpec#26173
tadelesh wants to merge 3 commits intomainfrom
refresh/search-latest-typespec

Conversation

@tadelesh
Copy link
Member

@tadelesh tadelesh commented Mar 9, 2026

Automated regeneration of the search Go SDK using the latest TypeSpec definitions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

sdk/resourcemanager/search/armsearch

@jliusan
Copy link
Member

jliusan commented Mar 11, 2026

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@JiaqiZhang-Dev JiaqiZhang-Dev marked this pull request as ready for review March 11, 2026 08:53
Copilot AI review requested due to automatic review settings March 11, 2026 08:53
@JiaqiZhang-Dev
Copy link
Member

we need to add migration guide in the changelog, waiting for this PR merged: #26217

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/v2 and 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.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
// - options - pass nil to accept the default values.
// - options - Contains optional client configuration. Pass nil to accept the default values.

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +9
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch"
moduleVersion = "v2.0.0"
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
directory: specification/search/resource-manager/Microsoft.Search/Search
commit: 402bf21e472d87c1b3abcd0b2675a8b6c8a42700
repo: i-specs
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@JiaqiZhang-Dev
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants