Redocly / Redocly/redocly-cli

Rules to disallow usage of vendor extensions

Open
#1,026 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

governance p3 Type: Enhancement
Dominant language
TypeScript
Stars
1.5k
Forks
228
Avg merge
1d 14h
Merged PRs (30d)
48

Description

Hello,
I didn't find any ready-made rule to avoid the use of vendor extensions and respect the basic standard.
I made this custom one, but the warning doesn't come out on the right line.
I think it would be interesting to have a basic rule for that.

Great work on this tool!

Describe the solution you'd like

rules:
  no-vendor-extensions: warn/error

Describe alternatives you've considered

rules:
  assert/no-vendor-extensions:
    severity: warn
    subject:
      type: any
    message: To respect the OpenAPI standard, please do not use vendor extensions
    assertions:
      notPattern: /^x-/

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation file or test is named. Start by reviewing the existing assert/no-vendor-extensions configuration and the tool's rule definitions to find how custom assertions report locations; done means a built-in no-vendor-extensions rule rejects vendor extensions such as x-* with the requested severity and reports the correct line.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.