Skip to content

Commit de3b7df

Browse files
authored
explaining relationship to RFC 9535
1 parent 9604d09 commit de3b7df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/guides/4a-rules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Let's look at all the properties that can be used for a rule.
3636

3737
The `given` property is conceptually similar to a selector in CSS, in that it indicates the part of the document to apply rules to.
3838

39-
`given` has a specific syntax known as [JSONPath](https://goessner.net/articles/JsonPath/index.html), which is similar to XPath. JSONPath is standardized by [IETF RFC 9535](https://datatracker.ietf.org/doc/rfc9535/) and has a few competing implementations. Spectral uses [nimma](https://www.npmjs.com/package/nimma) as its main implementation, and sometimes resorts to [jsonpath-plus](https://www.npmjs.com/package/jsonpath-plus) to ensure backwards-compatibility. Both support all the main JSONPath functionality and a bit more, but this syntax may differ slightly from other JSONPath implementations.
39+
`given` has a specific syntax known as [JSONPath](https://goessner.net/articles/JsonPath/index.html), which is similar to XPath. JSONPath has a few competing implementations. Spectral uses [nimma](https://www.npmjs.com/package/nimma) as its main implementation, and sometimes resorts to [jsonpath-plus](https://www.npmjs.com/package/jsonpath-plus) to ensure backwards-compatibility. Both support all the main JSONPath functionality and a bit more, but this syntax may differ slightly from other JSONPath implementations. Currently the implementation that Spectral uses is not fully aligned with [IETF RFC 9535](https://datatracker.ietf.org/doc/rfc9535/) (published in February 2024) which also is titled "JSONPath".
4040

4141
Your `given` value can be a string containing any valid JSONPath expression, or an array of expressions to apply a rule to multiple parts of a document.
4242
You can also consume your [aliases](4c-aliases.md) here if you have some defined.

0 commit comments

Comments
 (0)