Skip to content

Commit

Permalink
remove custom code for ResourceData (#43991)
Browse files Browse the repository at this point in the history
  • Loading branch information
live1206 committed May 11, 2024
1 parent d515bc8 commit b3b6c8a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 39 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 4 additions & 21 deletions sdk/resourcemanager/Azure.ResourceManager/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,41 +72,36 @@ directive:
- from: types.json
where: $.definitions.Resource
transform: >
$["x-ms-mgmt-referenceType"] = true;
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-ms-client-name"] = "ResourceData";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
$["x-csharp-usage"] = "model,input,output";
- from: types.json
where: $.definitions.TrackedResource
transform: >
$["x-ms-mgmt-referenceType"] = true;
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-ms-client-name"] = "TrackedResourceData";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
$["x-csharp-usage"] = "model,input,output";
- from: types.json
where: $.definitions.Plan
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
$["x-csharp-usage"] = "model,input,output";
- from: types.json
where: $.definitions.Sku
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
$["x-csharp-usage"] = "model,input,output";
- from: types.json
where: $.definitions.systemData
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
Expand All @@ -119,15 +114,13 @@ directive:
- from: types.json
where: $.definitions.encryptionProperties
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
$["x-csharp-usage"] = "model,input,output";
- from: types.json
where: $.definitions.KeyVaultProperties
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
Expand All @@ -140,8 +133,6 @@ directive:
- from: types.json
where: $.definitions.OperationStatusResult
transform: >
$["x-ms-mgmt-propertyReferenceType"] = false;
$["x-ms-mgmt-typeReferenceType"] = true;
$["x-csharp-formats"] = "json";
$["x-csharp-usage"] = "model,input,output";
- from: types.json
Expand All @@ -151,7 +142,6 @@ directive:
- from: managedidentity.json
where: $.definitions.SystemAssignedServiceIdentity
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
Expand All @@ -160,7 +150,6 @@ directive:
- from: managedidentity.json
where: $.definitions.UserAssignedIdentity
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
$["x-namespace"] = "Azure.ResourceManager.Models";
$["x-accessibility"] = "public";
$["x-csharp-formats"] = "json";
Expand Down Expand Up @@ -302,6 +291,8 @@ rename-mapping:
ResourceName: ResourceNameValidationContent
ResourceName.type: ResourceType|resource-type
ResourceNameStatus: ResourceNameValidationStatus
Resource: ResourceData
TrackedResource: TrackedResourceData
directive:
# These methods can be replaced by using other methods in the same operation group, remove for Preview.
Expand Down Expand Up @@ -332,10 +323,6 @@ directive:
- remove-operation: Providers_RegisterAtManagementGroupScope
- remove-operation: Subscriptions_CheckZonePeers
- remove-operation: AuthorizationOperations_List
- from: swagger-document
where: $.definitions.ExtendedLocation
transform: >
$["x-ms-mgmt-propertyReferenceType"] = true;
# Deduplicate
- from: subscriptions.json
where: '$.paths["/providers/Microsoft.Resources/operations"].get'
Expand Down Expand Up @@ -593,10 +580,6 @@ directive:
$.GenericResource.properties["changedTime"] = $.GenericResourceExpanded.properties["changedTime"];
$.GenericResource.properties["provisioningState"] = $.GenericResourceExpanded.properties["provisioningState"];
delete $.GenericResourceExpanded;
# - from: resources.json
# where: $.definitions['Provider']
# transform: >
# $["x-ms-mgmt-propertyReferenceType"] = true # not supported with ResourceData yet, use custom code first
- from: locks.json
where: $.definitions.ManagementLockObject
transform: $["x-ms-client-name"] = "ManagementLock"
Expand Down

0 comments on commit b3b6c8a

Please sign in to comment.