diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index 8ee96f4..3d30a87 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -53,6 +53,11 @@ * headers: * Content-Type: application/json * + * ## JSONPath + * + * [JSONPath](http://goessner.net/articles/JsonPath/) is the equivalent to XPath, for querying JSON data structures. + * Here's an [Online JSONPath Expressions Tester](http://jsonpath.curiousconcept.com/) + * * ## Public Properties * * * headers - array of headers going to be sent. @@ -958,13 +963,8 @@ public function grabResponse() } /** - * Returns data from the current JSON response using [JSONPath](http://goessner.net/articles/JsonPath/) as selector. - * JsonPath is XPath equivalent for querying Json structures. - * Try your JsonPath expressions [online](http://jsonpath.curiousconcept.com/). + * See [#jsonpath](#jsonpath) for general info on JSONPath. * Even for a single value an array is returned. - * - * This method **require [`flow/jsonpath` > 0.2](https://github.com/FlowCommunications/JSONPath/) library to be installed**. - * * Example: * * ``` php @@ -1054,12 +1054,8 @@ public function dontSeeResponseJsonMatchesXpath($xpath) } /** - * Checks if json structure in response matches [JsonPath](http://goessner.net/articles/JsonPath/). - * JsonPath is XPath equivalent for querying Json structures. - * Try your JsonPath expressions [online](http://jsonpath.curiousconcept.com/). - * This assertion allows you to check the structure of response json. - * - * This method **require [`flow/jsonpath` > 0.2](https://github.com/FlowCommunications/JSONPath/) library to be installed**. + * See [#jsonpath](#jsonpath) for general info on JSONPath. + * Checks if JSON structure in response matches JSONPath. * * ```json * { "store": { @@ -1108,7 +1104,8 @@ public function seeResponseJsonMatchesJsonPath($jsonPath) } /** - * Opposite to seeResponseJsonMatchesJsonPath + * See [#jsonpath](#jsonpath) for general info on JSONPath. + * Opposite to [`seeResponseJsonMatchesJsonPath()`](#seeResponseJsonMatchesJsonPath) * * @param string $jsonPath * @part json