opticdev/optic

Include operations exclusion for spectral ruleset

maticardenas opened this issue · 1 comments

Describe the enhancement

We have recently come across scenarios where we would have had found useful to exclude or skip certain operations from the spectral linting rules, and noticed that exclude_operations_with_extension does not work for the spectral ruleset in an optic configuration file.

ruleset:
  - breaking-changes:
      exclude_operations_with_extension: x-internal
  - naming:
      required_on: always
      severity: warn
      properties: snake_case
      pathComponents: param-case
      requestHeaders: Capital-Param-Case
      queryParameters: snake_case
      responseHeaders: param-case
      exclude_operations_with_extension: x-skip-lint
  - examples:
      required_on: always
      severity: warn
      require_request_examples: true
      require_response_examples: true
      require_parameter_examples: true
      exclude_operations_with_extension: x-skip-lint
  - spectral:
      exclude_operations_with_extension: x-skip-lint
      always:
        - .spectral.yml

Therefore the request would be enabling / adding exclude_operations_with_extension functionality for spectral ruleset, the same way it already exists for others.

niclim commented

Hi - this has been included in the 0.53.15 release