Authors:
@tatomyrAndrew Tatomyr (Redocly)
The no-http-verbs-in-paths rule is pre-built for a very specific set of patterns.
This rule is the general Swiss army knife version.
If you absolutely know something should not be in the path (for example foo), then add the pattern to prevent it.
Some common things to check using this rule: other common CRUD verbs, bad words, and internal code or terminology.
Add this to the rules section of your redocly.yaml:
rules:
rule/path-exclude-pattern:
subject:
type: Paths
assertions:
notPattern: \/wrongIf you want to exclude multiple patterns, you may write several rules like this each with a different pattern.
Here's an example of an OpenAPI description:
openapi: 3.1.0
info:
title: Title
version: 1.0.0
paths:
/good:
$ref: ./good.yaml
/wrong: # <-- This will error
$ref: ./wrong.yamlBuilt-in no-http-verbs-in-paths rule.