Skip to content

Commit

Permalink
change to use ArmResourceCreateOrReplaceSync
Browse files Browse the repository at this point in the history
  • Loading branch information
tadelesh committed Oct 23, 2023
1 parent 59a96ef commit 1a7e93f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/extensions/openapi-to-cadl/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export type TspArmResourceOperation = TspArmResourceListOperation | TspArmResour
export interface TspArmResourceNonListOperation extends TspArmResourceOperationBase {
kind:
| "ArmResourceRead"
| "ArmResourceCreateOrUpdateSync"
| "ArmResourceCreateOrReplaceSync"
| "ArmResourceCreateOrUpdateAsync"
| "ArmResourcePatchSync"
| "ArmResourcePatchAsync"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ function getTspOperations(armSchema: ArmResourceSchema): TspArmResourceOperation

// create operation
if (resourceMetadata.CreateOperations.length) {
// TODO: CreateOrUpdate / CreateOrReplace
// TODO: TBaseParameters
const operation = resourceMetadata.CreateOperations[0];
tspOperations.push({
doc: operation.Description,
kind: operation.IsLongRunning ? "ArmResourceCreateOrUpdateAsync" : "ArmResourceCreateOrUpdateSync",
kind: operation.IsLongRunning ? "ArmResourceCreateOrUpdateAsync" : "ArmResourceCreateOrReplaceSync",
name: getOperationName(operation.OperationID),
templateParameters: [resourceMetadata.Name],
});
Expand Down

0 comments on commit 1a7e93f

Please sign in to comment.