You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| subject | [Subject object](#subject-object) | **REQUIRED.** Locates the specific [OpenAPI node type](#subject-node-types-and-properties) or `any` (see [example](#any-example)) and possible properties and values that the [lint command](../commands/lint.md) evaluates. Use with `where` to narrow further. |
26
-
| assertions | [Assertion object](#assertion-object) | **REQUIRED.** Flags a problem when a defined assertion evaluates false. There are a variety of built-in assertions included. You may also create plugins with custom functions and use them as assertions. |
27
-
| where | [Where object](#where-object) | Narrows subjects by evaluating the where list first in the order defined (from top to bottom). The resolution of reference objects is done at the `where` level. See [where example](#where-example). The `where` evaluation itself does not result in any problems. |
28
-
| message | string | Custom text displayed when an assertion fails. Placeholders can be used to include contextual information such as the rule name, object type, property, error location, and problems. See [Using message placeholders](#using-message-placeholders) and [List of available placeholders](#list-of-available-placeholders) for details. |
29
-
| suggest | [string] | List of suggestions to display if the problem occurs. |
30
-
| severity | string | Configure the severity level of the problem if the assertion is false. It must be one of these values: `error`, `warn`, `off`. Default value is `error`. |
| subject | [Subject object](#subject-object) | **REQUIRED.** Locates the specific [OpenAPI node type](#subject-node-types-and-properties) or `any` (see [example](#any-example)) and possible properties and values that the [lint command](../commands/lint.md) evaluates. Use with `where` to narrow further. |
26
+
| assertions | [Assertion object](#assertion-object) | **REQUIRED.** Flags a problem when a defined assertion evaluates false. There are a variety of built-in assertions included. You may also create plugins with custom functions and use them as assertions. |
27
+
| where | [Where object](#where-object) | Narrows subjects by evaluating the where list first in the order defined (from top to bottom). The resolution of reference objects is done at the `where` level. See [where example](#where-example). The `where` evaluation itself does not result in any problems. |
28
+
| message | string | Custom text displayed when an assertion fails. Placeholders can be used to include contextual information such as the rule name, object type, property, error location, and problems. See [Using message placeholders](#use-placeholders-in-messages) and [List of available placeholders](#list-of-available-placeholders) for details. |
29
+
| suggest | [string] | List of suggestions to display if the problem occurs. |
30
+
| severity | string | Configure the severity level of the problem if the assertion is false. It must be one of these values: `error`, `warn`, `off`. Default value is `error`. |
31
31
32
32
## Subject object
33
33
@@ -670,7 +670,7 @@ rules:
670
670
- description
671
671
```
672
672
673
-
### Using message placeholders
673
+
### Use placeholders in messages
674
674
675
675
Custom rule messages can include dynamic placeholders that are replaced with contextual information when a rule fails.
676
676
This helps you provide clear, precise, and useful feedback about where and why a validation error occurred.
@@ -692,7 +692,7 @@ rules:
692
692
693
693
**Example output:**
694
694
695
-
```
695
+
```text
696
696
POST operation is missing a requestBody at #/paths/~1users/post
697
697
```
698
698
@@ -713,7 +713,7 @@ rules:
713
713
714
714
**Example output:**
715
715
716
-
```
716
+
```text
717
717
Rule rule/operation-validation failed: Operation at #/paths/~1users/post with key "post" — requestBody is required
0 commit comments