Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qualify rule names to simplify extending the ruleset #73

Open
DawMatt opened this issue Feb 23, 2024 · 0 comments
Open

Qualify rule names to simplify extending the ruleset #73

DawMatt opened this issue Feb 23, 2024 · 0 comments

Comments

@DawMatt
Copy link

DawMatt commented Feb 23, 2024

Currently this ruleset uses simple rule names like "content-type". If you want to extend this ruleset, simple, unqualified names like this increase the chances of name clashes when combining them with other rulesets.

The OWASP ruleset ( https://github.com/stoplightio/spectral-owasp-ruleset/blob/main/src/ruleset.ts ) uses a URN style naming scheme that makes name clashes extremely unlikely. Changing the rule names of the JSON:API spectral ruleset to align with this naming scheme would make it easier for others to adopt and extend this ruleset.

e.g. rule content-type could become rule json:api:1:sec4:content-type.

I'll submit a PR soon implementing this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant