paths-well-formed

paths-well-formed

This rule checks whether URLs of path items are well-formed.

Rule Details

Well-formed URLs enhance the readability and maintainability of the API’s structure.

The paths-well-formed rule is designed to ensure that all URLs of path items are well-formed. This includes:

Configuration

None.

Examples

Good.

paths:
  /users/{userId}:
    get:
      summary: Get a user by ID

Bad.

paths:
  //users/{}/:
    get:
      summary: Get a user by ID

When Not to Use It

We recommend to always enable this rule.

Compatibility

This rule is compatible with all OpenAPI 3.x versions.

← Back to Index