-
Notifications
You must be signed in to change notification settings - Fork 51
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
ARM: Add rule to enable disabling DeleteResponseCodes
LintDiff rule
#298
Conversation
All changed packages have been documented. |
packages/typespec-azure-resource-manager/src/rules/arm-delete-response-codes.ts
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/test/rules/arm-delete-response-codes.test.ts
Outdated
Show resolved
Hide resolved
f636103
to
f745247
Compare
You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/298/ Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/298/ |
1ac4c06
to
ead0b93
Compare
b31e4b7
to
3f61976
Compare
packages/typespec-azure-resource-manager/src/rules/arm-delete-response-codes.ts
Outdated
Show resolved
Hide resolved
0cef359
to
bc10649
Compare
bc10649
to
a58dd25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A coupl eof comments.
Also, we should deprecate ArmResourceDeleteAsync
unfortunately, this will likely mean adding some deprecation suppressions in samples.
docs/libraries/azure-resource-manager/rules/delete-operation-response-codes.md
Outdated
Show resolved
Hide resolved
docs/libraries/azure-resource-manager/rules/delete-operation-response-codes.md
Outdated
Show resolved
Hide resolved
docs/libraries/azure-resource-manager/rules/delete-operation-response-codes.md
Outdated
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/test/rules/arm-delete-response-codes.test.ts
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/src/rules/arm-delete-response-codes.ts
Outdated
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/src/rules/arm-delete-response-codes.ts
Outdated
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/src/rules/arm-delete-response-codes.ts
Outdated
Show resolved
Hide resolved
@markcowl updated. Please take a look at the splash radius associated with deprecating ArmResourceDeleteAsync. It seems pretty high, at least in the tests. Hopefully real specs aren't prolifically using this bad pattern 😨 |
faf1f6f
to
687a77c
Compare
b1bf769
to
1a67086
Compare
I will rebase this once approved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like some changes might be missing from the PR. Comments point these out
docs/libraries/azure-resource-manager/rules/delete-operation-response-codes.md
Outdated
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/test/rules/arm-delete-response-codes.test.ts
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/test/rules/core-operations.test.ts
Show resolved
Hide resolved
949eb65
to
cc9b5e3
Compare
cc9b5e3
to
b9aa706
Compare
@@ -180,6 +180,7 @@ model FlangeProperties { | |||
...DefaultProvisioningStateProperty; | |||
} | |||
|
|||
#suppress "deprecated" "Should replace TenantResourceDelete in the future" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markcowl I was able to update the other samples to simply use ArmResourceDeleteWithoutOkAsync
but this is an interface template of a template of a template, etc. so I just suppressed the deprecation warning...
@@ -412,6 +412,7 @@ op ArmResourceDeleteAsyncBase< | |||
* @template Response Optional. The success response(s) for the delete operation | |||
* @template Error Optional. The error response, if non-standard. | |||
*/ | |||
#deprecated "Use 'ArmResourceDeleteWithoutOkAsync' instead" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see the cascading effects of formally deprecating this.
@markcowl all comments should be resolved. The REST API specs PR has been merged |
Closes https://github.com/Azure/typespec-azure-pr/issues/3836
Impact
azure-openapi-validator
Azure/azure-openapi-validator#668