Skip to content

External type references are not handled properly. #10568

@ArthurMa1978

Description

@ArthurMa1978

This #8770 implemented support for external type references, however it doesn't work for some scenarios, here is a example:

model DeploymentPropertiesExtended {
  /**
   * The list of resource providers needed for the deployment.
   */
  @visibility(Lifecycle.Read)
  providers?: Provider[];
}

Here I want to replace the type Provder with a build-in type ResourceProviderData in .Net lib, it doesn't work, config like this:

@@alternateType(Provider,
  {
    identity: "Azure.ResourceManager.Resources.ResourceProviderData",
    package: "Azure.ResourceManager",
    minVersion: "1.14.0",
  },
  "csharp"
);

But when I try other build-in type in .Net, it works, config like this:

@@alternateType(Provider,
  {
    identity: "Azure.ResponseError",
    package: "Azure.Core",
    minVersion: "1.53.0",
  },
  "csharp"
);

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingemitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions