-
Notifications
You must be signed in to change notification settings - Fork 41
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
no-response-body rule is triggering for some standard templates #1740
base: main
Are you sure you want to change the base?
Conversation
All changed packages have been documented.
Show changes
|
You can try these changes here
|
docs/libraries/azure-resource-manager/rules/no-response-body.md
Outdated
Show resolved
Hide resolved
docs/libraries/azure-resource-manager/rules/no-response-body.md
Outdated
Show resolved
Hide resolved
docs/libraries/azure-resource-manager/rules/no-response-body.md
Outdated
Show resolved
Hide resolved
docs/libraries/azure-resource-manager/rules/no-response-body.md
Outdated
Show resolved
Hide resolved
docs/libraries/azure-resource-manager/rules/no-response-body.md
Outdated
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/test/rules/no-response-body.test.ts
Outdated
Show resolved
Hide resolved
@@ -24,6 +24,8 @@ describe("typespec-azure-resource-manager: no response body rule", () => { | |||
await tester | |||
.expect( | |||
` | |||
namespace Azure.MyService; |
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.
shouldn't this cause the rule not to execute?
await tester | ||
.expect( | ||
` | ||
namespace Azure.MyService; |
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.
Doesn't this cause the rule not to execute?
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.
no, this is what makes the rule to execute, this rule is only executed on Azure namespaces, this is also the core rule for reference: https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-core/src/rules/no-response-body.ts
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.
Most ARM namespace start with Microsoft.
Our namespaces in typespec-azure, like Azure.Core and Azure.ResourceManager start with Azure.
await tester | ||
.expect( | ||
` | ||
namespace Azure.MyService; |
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.
same
Co-authored-by: Mark Cowlishaw <[email protected]>
Co-authored-by: Mark Cowlishaw <[email protected]>
…dez/typespec-azure into no-response-body-rule
issue: #1552