Skip to content

Commit

Permalink
docs: clearer explanation of skip, and finish a broken sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
lornajane committed Aug 11, 2023
1 parent ae7bedc commit 5073b03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/custom-plugins/custom-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ The context object contains additional functionality that is helpful for rules t
- `key` - Key in the parent object or array.
- `oasVersion` - Specific OAS minor version of the current document (can be `oas2`, `oas3` or `oas3_1`).

The context object also offers some additional functionality that
The context object also offers some additional functionality to resolve references and to return information about a problem to the user. The methods available are as follows:

- `resolve(node)` - Synchronously dereferences `$ref` node to its value. Works only with `$refs` from the original document. If you need to resolve a reference from another source, you can use the optional second parameter: `resolve(node, from: string)`.
- `report(descriptor)` - Reports a problem in the definition and returns information to the user. See [Report rule context](#report-rule-context) for more information.

Expand Down
2 changes: 1 addition & 1 deletion docs/custom-plugins/visitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To understand how this applies to your API description, think of the document as
In your plugin, create a JavaScript visitor object, and describe the functionality required for each type of node.

Redocly CLI calls `enter()` while going down the tree and `leave()` going up the tree after processing the node and its children.
`skip()` predicate is called and if it returns `true` the node is ignored for this visitor.
If the `skip()` predicate is defined and returns `true` the node is ignored for this visitor.


```js
Expand Down

0 comments on commit 5073b03

Please sign in to comment.