docs: Add a note about expected newlines in multiline markdown fields (#1372)

This commit is contained in:
Lorna Jane Mitchell
2024-01-02 11:17:36 +00:00
committed by GitHub
parent 23eeb3ce85
commit 574541f12e

View File

@@ -493,6 +493,11 @@ rules:
notPattern: /^The/
```
Take care using `notPattern` with multiline Markdown values such as
`description` fields. These may end with a newline rather than the character
you expect. Use the trimmed notations (`|-` or `>-`) or take account of this in
your pattern.
### `pattern` example
The following example asserts that the operation summary contains "test".
@@ -507,6 +512,10 @@ rules:
pattern: /test/
```
Take care using `pattern` with multiline Markdown values such as `description`
fields. These may end with a newline rather than the character you expect. Use
the trimmed notations (`|-` or `>-`) or take account of this in your pattern.
### `ref` example
The following example asserts that schema in MediaType contains a Reference object ($ref).