Skip to content

Commit

Permalink
Disable rules for TypeSpec.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjprescott committed Apr 3, 2024
1 parent 906b6a6 commit 68a7cea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/rulesets/src/spectral/az-arm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ const ruleset: any = {
rpcGuidelineCode: "RPC-Async-V1-01, RPC-Put-V1-11",
description: "LRO and Synchronous PUT must have 200 & 201 return codes.",
severity: "error",
disableForTypeSpec: true,
disableForTypeSpecReason: "Covered by TSP's '@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes' rule.",
message: "{{error}}",
resolved: true,
formats: [oas2],
Expand Down Expand Up @@ -157,6 +159,8 @@ const ruleset: any = {
description: "Location header must be supported for all async operations that return 202.",
message: "A 202 response should include an Location response header.",
severity: "error",
disableForTypeSpec: true,
disableForTypeSpecReason: "Covered by TSP's '@azure-tools/typespec-azure-resource-manager/arm-location-header' rule.",
formats: [oas2],
given: "$.paths[*][*].responses[?(@property == '202')]",
then: {
Expand All @@ -173,6 +177,8 @@ const ruleset: any = {
description:
"Synchronous POST must have either 200 or 204 return codes and LRO POST must have 202 return code. LRO POST should also have a 200 return code only if the final response is intended to have a schema",
severity: "error",
disableForTypeSpec: true,
disableForTypeSpecReason: "Covered by TSP's '@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes' rule.",
message: "{{error}}",
resolved: true,
formats: [oas2],
Expand Down
2 changes: 2 additions & 0 deletions packages/rulesets/src/spectral/az-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ const ruleset: any = {
message:
"'{{property}}' parameter lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation.",
severity: "error",
disableForTypeSpec: true,
disableForTypeSpecReason: "Covered by TSP's '@azure-tools/typespec-azure-core/documentation-required' rule.",
resolved: false,
formats: [oas2],
given: ["$.parameters.*"],
Expand Down

0 comments on commit 68a7cea

Please sign in to comment.