Skip to content

Add support for suppressions.yaml #274

Description

Precursors:

To workaround problems like this:

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

- 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:

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions