Redocly / redocly-vs-code

Redocly VS Code extension
37 stars 8 forks source link

Extension ignores linting rules defined in oas2_0Rules, oas3_0Rules and oas3_1Rules fields in .redocly.yaml #21

Open roman-sainchuk opened 2 years ago

roman-sainchuk commented 2 years ago

What happened?

Looks like extension always uses only recommended rules

What should have happened instead?

Rules defined in oas3_0Rules should override recommended rules

Minimal reproducible OpenAPI snippet

apiDefinitions:
  main: ./openapi.yaml
lint:
  rules:
    info-description: warn
    info-contact: off
    info-license: off
    info-license-url: off
    tag-description: warn
    tags-alphabetical: off
    parameter-description: off
    no-path-trailing-slash: warn
    no-identical-paths: warn
    no-ambiguous-paths: warn
    path-declaration-must-exist: warn
    path-not-include-query: warn
    path-parameters-defined: warn
    operation-description: off
    operation-2xx-response: warn
    operation-4xx-response: off
    operation-operationId: warn
    operation-summary: error
    operation-operationId-unique: warn
    operation-parameters-unique: warn
    operation-tag-defined: off
    operation-security-defined: warn
    operation-operationId-url-safe: warn
    operation-singular-tag: off
    no-unresolved-refs: error
    no-enum-type-mismatch: warn
    boolean-parameter-prefixes: off
    paths-kebab-case: off
    no-invalid-schema-examples: off
    no-invalid-parameter-examples: off
    no-unused-components: warn
    spec: error
  oas3_0Rules: 
    no-invalid-media-type-examples: warn
  extends: []