Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Resource Properties Bag Updatable #979

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions .chronus/changes/res-vis-2024-5-12-4-34-46.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Make Resource Properties Bag Updatable
Original file line number Diff line number Diff line change
Expand Up @@ -1660,11 +1660,7 @@
"properties": {
"$ref": "#/definitions/AllPropertiesProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
},
"eTag": {
"type": "string",
Expand Down Expand Up @@ -1822,11 +1818,7 @@
"properties": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TestExtensionProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -1858,11 +1850,7 @@
"properties": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TestTenantProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand All @@ -1878,11 +1866,7 @@
"properties": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TrackedChildProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -1918,11 +1902,7 @@
"properties": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TestTrackedProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -1972,11 +1952,7 @@
"properties": {
"$ref": "#/definitions/Microsoft.OperationsTest.TestTrackedProperties2",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,7 @@
"properties": {
"$ref": "#/definitions/WidgetResourceProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
},
"extendedLocation": {
"$ref": "#/definitions/Azure.ResourceManager.CommonTypes.ExtendedLocation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,7 @@
"properties": {
"$ref": "#/definitions/WidgetResourceProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,7 @@
"properties": {
"$ref": "#/definitions/WidgetResourceProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
},
"identity": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/managedidentity.json#/definitions/ManagedServiceIdentity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,7 @@
"properties": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v4/privatelinks.json#/definitions/PrivateEndpointConnectionProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -690,11 +686,7 @@
"properties": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v4/privatelinks.json#/definitions/PrivateLinkResourceProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -759,11 +751,7 @@
"properties": {
"$ref": "#/definitions/TestTrackedProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,7 @@
"properties": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/privatelinks.json#/definitions/PrivateEndpointConnectionProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -690,11 +686,7 @@
"properties": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/privatelinks.json#/definitions/PrivateLinkResourceProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -759,11 +751,7 @@
"properties": {
"$ref": "#/definitions/TestTrackedProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,7 @@
"properties": {
"$ref": "#/definitions/RoleAssignmentProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,7 @@
"properties": {
"$ref": "#/definitions/DependentProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down Expand Up @@ -821,11 +817,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,7 @@
"properties": {
"$ref": "#/definitions/EmployeeProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true,
"x-ms-mutability": [
"read",
"create"
]
"x-ms-client-flatten": true
}
},
"allOf": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ model ResourceUpdateModelProperties<
model ResourceUpdateModel<
Resource extends Foundations.Resource,
Properties extends TypeSpec.Reflection.Model
> is OptionalProperties<UpdateableProperties<OmitProperties<Resource, "Name" | "name">>> {
>
is OptionalProperties<UpdateableProperties<OmitProperties<
Resource,
"Name" | "name" | "properties"
>>> {
@extension("x-ms-client-flatten", true)
properties?: ResourceUpdateModelProperties<Resource, Properties>;
}
Expand Down
3 changes: 0 additions & 3 deletions packages/typespec-azure-resource-manager/lib/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ model ResourceNameParameter<
@includeInapplicableMetadataInPayload(false)
model TrackedResource<Properties extends {}> extends Foundations.TrackedResource {
@doc("The resource-specific properties for this resource.")
@visibility("read", "create")
@extension("x-ms-client-flatten", true)
properties?: Properties;
}
Expand All @@ -62,7 +61,6 @@ model TrackedResource<Properties extends {}> extends Foundations.TrackedResource
@includeInapplicableMetadataInPayload(false)
model ProxyResource<Properties extends {}> extends Foundations.ProxyResource {
@doc("The resource-specific properties for this resource.")
@visibility("read", "create")
@extension("x-ms-client-flatten", true)
properties?: Properties;
}
Expand All @@ -79,7 +77,6 @@ model ProxyResource<Properties extends {}> extends Foundations.ProxyResource {
@includeInapplicableMetadataInPayload(false)
model ExtensionResource<Properties extends {}> extends Foundations.ExtensionResource {
@doc("The resource-specific properties for this resource.")
@visibility("read", "create")
@extension("x-ms-client-flatten", true)
properties?: Properties;
}
Expand Down
Loading