openrewrite / rewrite-docs

Stores the markdown documents used to generate docs.openrewrite.org
https://docs.openrewrite.org
Apache License 2.0
40 stars 47 forks source link

Remove `JsonPathMatcher.encloses(Cursor c)` from JsonPathMatcher page #267

Closed timtebeek closed 5 months ago

timtebeek commented 5 months ago

As reported on Slack: https://rewriteoss.slack.com/archives/C01A843MWG5/p1713709042315309

The docs reference on JsonPathMatcher mentions an JsonPathMatcher.encloses(Cursor c) method, however I don't find that in the implementation. Looks like there was a method back in 2022 that was removed.

https://github.com/openrewrite/rewrite-docs/blob/3ebe9769e90256e7c47a73252a7dca28dc816a05/reference/jsonpath-and-jsonpathmatcher-reference.md?plain=1#L123

mike-solomon commented 5 months ago

As part of this issue - I think we should do a review of this whole doc. Is it still accurate? Does JsonPathMatcher still exist and function the way it's described? Or is this just that one line that's wrong?

timtebeek commented 5 months ago

We still have multiple such classes for HCL, JSON and Yaml; I think it's just that one method that was removed. See for instance https://github.com/openrewrite/rewrite/blob/main/rewrite-yaml/src/main/java/org/openrewrite/yaml/JsonPathMatcher.java