Skip to content

@markAsLro doesn't behave correctly #3417

@pshao25

Description

@pshao25

Case 1: response 200 with body and 202 without body

Real case in cost-management.

Playground

@Azure.ClientGenerator.Core.Legacy.markAsLro
get is Extension.Read<
  Extension.ScopeParameter,
  Employee,
  Response = ArmResponse<Employee> | ArmAcceptedResponse,
  Error = ErrorResponse
>;

Actual: TCGC throws error
Expected: lroMatadata returns correctly

Case 2: response 200 with body and 202 with body too

Real case in web.

Playground.

@Azure.ClientGenerator.Core.Legacy.markAsLro
  getProductionSiteDeploymentStatus is CsmDeploymentStatusOps.Read<
    Employee,
     Response = ArmResponse<Employee> | ArmAcceptedResponse & Employee
  >;

Actual: finalStateVia: original-uri
Expected: finalStateVia: location

Metadata

Metadata

Assignees

Labels

lib:tcgcIssues for @azure-tools/typespec-client-generator-core library

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions