-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Use CustomPatch for EdgeActions Service #39517
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
Changes from all commits
93fbf6c
125fa86
e02d948
77333de
c5a9a76
b1332d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,15 @@ model SkuType { | |
| tier: string; | ||
| } | ||
|
|
||
| /** The SKU type for update operations */ | ||
| model SkuTypeUpdate { | ||
| /** The name of the SKU */ | ||
| name?: string; | ||
|
|
||
| /** The tier of the SKU */ | ||
| tier?: string; | ||
| } | ||
|
|
||
| /** The deployment type for edge action versions */ | ||
| union EdgeActionVersionDeploymentType { | ||
| string, | ||
|
|
@@ -133,6 +142,7 @@ model EdgeActionAttachmentResponse { | |
| edgeActionId: string; | ||
| } | ||
|
|
||
| #suppress "@azure-tools/typespec-azure-resource-manager/empty-updateable-properties" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| @doc("Represents an edge action properties") | ||
| model EdgeActionProperties { | ||
| @doc("The provisioning state of the edge action") | ||
|
|
@@ -144,6 +154,23 @@ model EdgeActionProperties { | |
| attachments: EdgeActionAttachment[]; | ||
| } | ||
|
|
||
| /** The type used for update operations of the EdgeAction. */ | ||
| model EdgeActionUpdate { | ||
| @doc("The resource-specific properties for this resource.") | ||
| properties?: EdgeActionPropertiesUpdate; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is to avoid breaking change in generated swagger |
||
|
|
||
| @doc("The sku type of the edge action") | ||
| sku?: SkuTypeUpdate; | ||
|
|
||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
tundwed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| @doc("Resource tags.") | ||
| tags?: Record<string>; | ||
| } | ||
|
|
||
| /** Represents an edge action properties */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/no-empty-model" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| model EdgeActionPropertiesUpdate {} | ||
|
|
||
| @doc("Represents an edge action version") | ||
| model EdgeActionVersionProperties { | ||
| @doc("The deployment type") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,7 @@ model EdgeActionExecutionFilter | |
| interface EdgeActions { | ||
| get is ArmResourceRead<EdgeAction>; | ||
| create is ArmResourceCreateOrUpdateAsync<EdgeAction>; | ||
| update is ArmResourcePatchAsync<EdgeAction, EdgeActionProperties>; | ||
| update is ArmCustomPatchAsync<EdgeAction, EdgeActionUpdate>; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like we are updating the input (request object) from EdgeActionProperties to EdgeActionUpdate @kazrael2119 I think that would impact not just the client but also our api, we would have to update our model classes and the api. Do we need to change the request object? same for the other object
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tundwed This change to ArmCustomPatchAsync will not change the input model and you could compare the main update with this commit change. Actually this change would not update any REST-level stuff. We just switched the template from ArmResourcePatchAsync to ArmCustomPatchAsync which is our recommandation in guide so that client side could better handle this operation. The same for the other object.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, got it. |
||
| delete is ArmResourceDeleteWithoutOkAsync<EdgeAction>; | ||
| listByResourceGroup is ArmResourceListByParent<EdgeAction>; | ||
| listBySubscription is ArmListBySubscription<EdgeAction>; | ||
|
|
@@ -109,9 +109,12 @@ interface EdgeActions { | |
| interface EdgeActionVersions { | ||
| get is ArmResourceRead<EdgeActionVersion>; | ||
| create is ArmResourceCreateOrUpdateAsync<EdgeActionVersion>; | ||
| update is ArmResourcePatchAsync< | ||
| update is ArmCustomPatchAsync< | ||
| EdgeActionVersion, | ||
| EdgeActionVersionProperties | ||
| Azure.ResourceManager.Foundations.ResourceUpdateModel< | ||
| EdgeActionVersion, | ||
| EdgeActionVersionProperties | ||
| > | ||
| >; | ||
| delete is ArmResourceDeleteWithoutOkAsync<EdgeActionVersion>; | ||
| listByEdgeAction is ArmResourceListByParent<EdgeActionVersion>; | ||
|
|
@@ -134,9 +137,12 @@ interface EdgeActionVersions { | |
| interface EdgeActionExecutionFilters { | ||
| get is ArmResourceRead<EdgeActionExecutionFilter>; | ||
| create is ArmResourceCreateOrUpdateAsync<EdgeActionExecutionFilter>; | ||
| update is ArmResourcePatchAsync< | ||
| update is ArmCustomPatchAsync< | ||
| EdgeActionExecutionFilter, | ||
| EdgeActionExecutionFilterProperties | ||
| Azure.ResourceManager.Foundations.ResourceUpdateModel< | ||
| EdgeActionExecutionFilter, | ||
| EdgeActionExecutionFilterProperties | ||
| > | ||
| >; | ||
| delete is ArmResourceDeleteWithoutOkAsync<EdgeActionExecutionFilter>; | ||
| listByEdgeAction is ArmResourceListByParent<EdgeActionExecutionFilter>; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.