Azure / Azure/avocado

Add support for suppressions.yaml

Open
#274 1 comment 1 reaction 1 assignee Claimed by @mikeharder View on GitHub
Dominant language
TypeScript
Stars
23
Forks
22
Avg merge
2d 9h
Merged PRs (30d)
13

Description

Precursors:

- https://github.com/Azure/azure-rest-api-specs/issues/40837
- https://github.com/Azure/azure-rest-api-specs/issues/40849

To workaround problems like this:

- https://github.com/Azure/avocado/issues/150

We should add support for suppressing Avocado errors in `suppresions.yaml`. An example suppression might look like:

```yaml
- tool: SwaggerAvocado
rules: [MISSING_APIS_IN_DEFAULT_TAG]
paths: [readme.md]
sub-paths:
- "/subscriptions/{}/providers/microsoft.foo/bar/{}/providers/microsoft.foo/baz"
- "/subscriptions/{}/providers/microsoft.foo/bar/{}/providers/microsoft.foo/baz/{}"
```

Supporting this would require adding option `subPaths` alongside `paths` in the suppression interface:

```js
export interface Suppression {
tool: string;
if?: string;
paths: string[];
rules?: string[];
subPaths?: string[]; // new
subRules?: string[];
reason: string;
}
```

Common rules to suppress:
- MISSING_APIS_IN_DEFAULT_TAG
- Allowed if APIs were approved for removal/deprecation
- MULTIPLE_API_VERSION
- Small number of specs still don't have aligned API versions. Better to suppress once in suppressions.yaml, than suppress in every future PR.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.