Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "./models.tsp";
using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.Workloads;
/**
Expand Down Expand Up @@ -78,45 +77,73 @@ interface SAPVirtualInstances {
/**
* Gets the sizing recommendations.
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Added Operation ID as it determines the PowerShell verb used."
@operationId("SapVirtualInstances_InvokeSizingRecommendations")
getSizingRecommendations is VirtualResourceActionSync<
SAPVirtualInstanceMetadata,
getSizingRecommendations is ArmResourceActionSync<
SubscriptionLocationResource,
SAPSizingRecommendationRequest,
SAPSizingRecommendationResult
SAPSizingRecommendationResult,
Parameters = {
/**
* The default variable.
*/
@path
@segment("sapVirtualInstanceMetadata")
@key
name: "default";
}
>;

/**
* Get a list of SAP supported SKUs for ASCS, Application and Database tier.
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Added Operation ID as it determines the PowerShell verb used."
@operationId("SapVirtualInstances_InvokeSapSupportedSku")
getSapSupportedSku is VirtualResourceActionSync<
SAPVirtualInstanceMetadata,
getSapSupportedSku is ArmResourceActionSync<
SubscriptionLocationResource,
SAPSupportedSkusRequest,
SAPSupportedResourceSkusResult
SAPSupportedResourceSkusResult,
Parameters = {
/**
* The default variable.
*/
@path
@segment("sapVirtualInstanceMetadata")
@key
name: "default";
}
>;

/**
* Get the SAP Disk Configuration Layout prod/non-prod SAP System.
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Added Operation ID as it determines the PowerShell verb used."
@operationId("SapVirtualInstances_InvokeDiskConfigurations")
getDiskConfigurations is VirtualResourceActionSync<
SAPVirtualInstanceMetadata,
getDiskConfigurations is ArmResourceActionSync<
SubscriptionLocationResource,
SAPDiskConfigurationsRequest,
SAPDiskConfigurationsResult
SAPDiskConfigurationsResult,
Parameters = {
/**
* The default variable.
*/
@path
@segment("sapVirtualInstanceMetadata")
@key
name: "default";
}
>;

/**
* Get the recommended SAP Availability Zone Pair Details for your region.
*/
#suppress "@azure-tools/typespec-azure-core/no-openapi" "Added Operation ID as it determines the PowerShell verb used."
@operationId("SapVirtualInstances_InvokeAvailabilityZoneDetails")
getAvailabilityZoneDetails is VirtualResourceActionSync<
SAPVirtualInstanceMetadata,
getAvailabilityZoneDetails is ArmResourceActionSync<
SubscriptionLocationResource,
SAPAvailabilityZoneDetailsRequest,
SAPAvailabilityZoneDetailsResult
SAPAvailabilityZoneDetailsResult,
Parameters = {
/**
* The default variable.
*/
@path
@segment("sapVirtualInstanceMetadata")
@key
name: "default";
}
>;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ using Microsoft.Workloads;
"SapApplicationServerInstances",
"autorest"
);
@@clientName(SAPVirtualInstances.getSizingRecommendations,
"InvokeSizingRecommendations"
);
@@clientName(SAPVirtualInstances.getSapSupportedSku, "InvokeSapSupportedSku");
@@clientName(SAPVirtualInstances.getDiskConfigurations,
"InvokeDiskConfigurations"
);
@@clientName(SAPVirtualInstances.getAvailabilityZoneDetails,
"InvokeAvailabilityZoneDetails"
);
Comment on lines 20 to 35
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change? It's causing breaking changes, at least for Java.

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed the @operationId decorator on these operations therefore to keep the swagger unchanged, I have to add them back.
Looks like every language has an issue on this.
Let me add autorest scope on these so that our SDKs are not impacted.

Copy link
Member

Choose a reason for hiding this comment

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

image

Same breaking as java and will generate again after "autorest" scop added.


@@Azure.ClientGenerator.Core.Legacy.flattenProperty(SAPApplicationServerInstance.properties,
"autorest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ using Microsoft.Workloads;
@@clientName(SAPCentralServerInstance, "SapCentralServerInstance", "java");
@@clientName(SAPDatabaseInstance, "SapDatabaseInstance", "java");
@@clientName(SAPVirtualInstance, "SapVirtualInstance", "java");
@@clientName(SAPVirtualInstanceMetadata, "SapVirtualInstanceMetadata", "java");
@@clientName(UpdateSAPVirtualInstanceRequest,
"UpdateSapVirtualInstanceRequest",
"java"
Expand Down Expand Up @@ -216,10 +215,6 @@ using Microsoft.Workloads;
@@clientName(SAPCentralServerInstance, "SapCentralServerInstance", "csharp");
@@clientName(SAPDatabaseInstance, "SapDatabaseInstance", "csharp");
@@clientName(SAPVirtualInstance, "SapVirtualInstance", "csharp");
@@clientName(SAPVirtualInstanceMetadata,
"SapVirtualInstanceMetadata",
"csharp"
);
@@clientName(UpdateSAPVirtualInstanceRequest,
"UpdateSapVirtualInstanceRequest",
"csharp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,6 @@
using Http;
using Rest;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;

/**
* A synchronous resource action.
* @template Resource The resource being acted upon
* @template Request The request model for the action
* @template Response The response model for the action
* @template BaseParameters Optional. Allows overriding the parameters for the operation
* @template Parameters Optional. Additional parameters after the path parameters
* @template Error Optional. The error response, if non-standard.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "Custom template"
// THIS IS TO PROVIDE a temp workaround. The standard ArmResourceXX operations will be expected to support
// ARM virtual resources. Until then, use this custom template
@autoRoute
@armResourceAction(Resource)
@post
@returnsDoc("Azure operation completed successfully.")
op VirtualResourceActionSync<
Resource extends Foundations.Resource,
Request extends TypeSpec.Reflection.Model | void,
Response extends TypeSpec.Reflection.Model | void,
BaseParameters = DefaultBaseParameters<Resource>,
Parameters extends {} = {},
Error extends {} = ErrorResponse
>(
...ResourceInstanceParameters<Resource, BaseParameters>,
...Parameters,

@doc("The content of the action request")
@bodyRoot
body: Request,
): Response | Error;

/**
* @dev A long-running resource action.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import "./SAPVirtualInstance.tsp";
import "./SAPCentralServerInstance.tsp";
import "./SAPDatabaseInstance.tsp";
import "./SAPApplicationServerInstance.tsp";
import "./SAPVirtualInstanceMetadata.tsp";
import "./custom.tsp";
import "./back-compatible.tsp";

Expand Down
Loading