# paths-well-formed

Source: https://apigenie.pl/docs/linter/openapi/rules/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:

- starting with a forward slash
- not ending with a forward slash
- not having multiple consecutive slashes (e.g., `//`)
- not having empty parameter placeholders (e.g., `/{}/` parts)

## Configuration

None.

## Examples

**Good**.

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

**Bad**.

```yaml
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.
