Skip to content

Commit

Permalink
Upgrade/rp tsp 0.60 (Azure#19551) -- applying only for specification/…
Browse files Browse the repository at this point in the history
…terraform
  • Loading branch information
gerrytan committed Sep 19, 2024
1 parent 323d870 commit 6759c08
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ namespace Microsoft.AzureTerraform;
interface Operations extends Azure.ResourceManager.Operations {}

@doc("The parameter type")
@extension(
"x-ms-enum",
{
name: "parameterType",
modelAsString: true,
}
)
union Type {
string,
ExportResource: "ExportResource",
Expand All @@ -28,13 +21,6 @@ union Type {
}

@doc("The target Azure Terraform Provider")
@extension(
"x-ms-enum",
{
name: "targetProvider",
modelAsString: true,
}
)
union targetProvider {
string,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ using OpenAPI;
namespace Microsoft.AzureTerraform;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation" "Cannot use @armResourceOperations decorator here, the auto-generated routes do not match feature requirements"
#suppress "@azure-tools/typespec-azure-core/no-openapi" "TODO: migrate to LRO concepts DO NOT USE x-ms-long-running-operation-options"
@doc("Exports the Terraform configuration of the specified resource(s).")
@route("/subscriptions/{subscriptionId}/providers/Microsoft.AzureTerraform/exportTerraform")
@post
Expand All @@ -29,7 +30,6 @@ op exportTerraform(

@doc("The export parameter")
@body
@extension("x-ms-parameter-location", "method")
exportParameter: BaseExportModel,
): ArmAcceptedLroResponse<
"Export request accepted.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ options:
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/export.json"
examples-directory: "{project-root}/examples"
linter:
extends:
- "@azure-tools/typespec-azure-rulesets/resource-manager"
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@
"required": true,
"schema": {
"$ref": "#/definitions/BaseExportModel"
},
"x-ms-parameter-location": "method"
}
}
],
"responses": {
Expand Down Expand Up @@ -176,7 +175,7 @@
}
},
"202": {
"description": "The request has been accepted for processing, but processing has not yet completed.",
"description": "InProgress operation status",
"schema": {
"$ref": "#/definitions/OperationStatus"
},
Expand Down Expand Up @@ -231,7 +230,19 @@
],
"x-ms-enum": {
"name": "targetProvider",
"modelAsString": true
"modelAsString": true,
"values": [
{
"name": "azurerm",
"value": "azurerm",
"description": "https://registry.terraform.io/providers/hashicorp/azurerm/latest"
},
{
"name": "azapi",
"value": "azapi",
"description": "https://registry.terraform.io/providers/Azure/azapi/latest"
}
]
}
},
"fullProperties": {
Expand Down Expand Up @@ -421,8 +432,22 @@
"ExportQuery"
],
"x-ms-enum": {
"name": "parameterType",
"modelAsString": true
"name": "Type",
"modelAsString": true,
"values": [
{
"name": "ExportResource",
"value": "ExportResource"
},
{
"name": "ExportResourceGroup",
"value": "ExportResourceGroup"
},
{
"name": "ExportQuery",
"value": "ExportQuery"
}
]
}
}
},
Expand Down

0 comments on commit 6759c08

Please sign in to comment.