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

Disable LintDiff rules for TypeSpec 0.55 #669

Merged
merged 3 commits into from
Apr 3, 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
2 changes: 1 addition & 1 deletion packages/rulesets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft.azure/openapi-validator-rulesets",
"version": "2.0.1",
"version": "2.0.2",
"description": "Azure OpenAPI Validator",
"main": "dist/index.js",
"scripts": {
Expand Down
8 changes: 8 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 Expand Up @@ -798,6 +804,8 @@ const ruleset: any = {
description: "This rule ensures that the authors explicitly define these restrictions as a regex on the resource name.",
message: "{{error}}",
severity: "error",
disableForTypeSpec: true,
disableForTypeSpecReason: "Covered by TSP's '@azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern' rule.",
tjprescott marked this conversation as resolved.
Show resolved Hide resolved
resolved: true,
formats: [oas2],
given: "$[paths,'x-ms-paths'].*.^",
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