Skip to content

Missing endpoint parameter referenced in generated output #3782

@xirzec

Description

@xirzec

Having an issue where the generated output from https://github.com/Azure/azure-rest-api-specs-pr/pull/26801 does not compile properly.

The endpoint is defined in what appears to be a standard fashion:

@armProviderNamespace
@service(#{ title: "NetworkCloud" })
@server(
  "{endpoint}",
  "Azure ARM endpoint",
  {
    endpoint: url,
  }
)
@versioned(Versions)
namespace Microsoft.NetworkCloud;

Yet the generated code seems to be missing the endpointParam despite it still being referenced:

/** The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as on-premises clusters, hardware resources, and workload infrastructure resources. */
export function createNetworkCloud(
  credential: TokenCredential,
  subscriptionId: string,
  options: NetworkCloudClientOptionalParams = {},
): NetworkCloudContext {
  const endpointUrl =
    options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? String(endpointParam);

Looks like this is resolved in

// We have been calling this endpointParam, so special handling this here to make sure there are no unexpected side effects

My guess it that the recent bump of TCGC (#3759) introduced some change to how this endpoint union gets constructed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions