mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-11 05:35:53 +03:00
Update documentation for isIsoDate.
This commit is contained in:
parent
9a07bf4993
commit
750f7120ea
@ -182,7 +182,7 @@ Predicates consist of a predicate function and a predicate value. Predicate func
|
||||
| __`exists`__ | Query returns a value | `jsonpath "$.book" exists` |
|
||||
| __`isBoolean`__ | Query returns a boolean | `jsonpath "$.succeeded" isBoolean` |
|
||||
| __`isCollection`__ | Query returns a collection | `jsonpath "$.books" isCollection` |
|
||||
| __`isDate`__ | Query returns a date | `jsonpath "$.publication_date" isDate` |
|
||||
| __`isIsoDate`__ | Query string returns a [RFC 3339] date (`YYYY-MM-DDTHH:mm:ss.sssZ`) | `jsonpath "$.publication_date" isIsoDate` |
|
||||
| __`isEmpty`__ | Query returns an empty collection | `jsonpath "$.movies" isEmpty` |
|
||||
| __`isFloat`__ | Query returns a float | `jsonpath "$.height" isFloat` |
|
||||
| __`isInteger`__ | Query returns an integer | `jsonpath "$.count" isInteger` |
|
||||
@ -828,3 +828,4 @@ of all file nodes.
|
||||
[count]: /docs/filters.md#count
|
||||
[`decode` filter]: /docs/filters.md#decode
|
||||
[headers implicit asserts]: #headers
|
||||
[RFC 3339]: https://www.rfc-editor.org/rfc/rfc3339
|
||||
|
@ -165,7 +165,8 @@ Short description:
|
||||
<span class="grammar-symbol">|</span><a href="#boolean-predicate">boolean-predicate</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#string-predicate">string-predicate</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#collection-predicate">collection-predicate</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#date-predicate">date-predicate</a></div></div>
|
||||
<span class="grammar-symbol">|</span><a href="#date-predicate">date-predicate</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#iso-date-predicate">iso-date-predicate</a></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="equal-predicate">equal-predicate</span><span class="grammar-usedby">(used by <a href="#predicate-func">predicate-func</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><span class="grammar-literal">equals</span><span class="grammar-symbol">|</span><span class="grammar-literal">==</span><span class="grammar-symbol">)</span> <a href="#sp">sp</a> <a href="#predicate-value">predicate-value</a></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="not-equal-predicate">not-equal-predicate</span><span class="grammar-usedby">(used by <a href="#predicate-func">predicate-func</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><span class="grammar-literal">notEquals</span><span class="grammar-symbol">|</span><span class="grammar-literal">!=</span><span class="grammar-symbol">)</span> <a href="#sp">sp</a> <a href="#predicate-value">predicate-value</a></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="greater-predicate">greater-predicate</span><span class="grammar-usedby">(used by <a href="#predicate-func">predicate-func</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><span class="grammar-literal">greaterThan</span><span class="grammar-symbol">|</span><span class="grammar-literal">></span><span class="grammar-symbol">)</span> <a href="#sp">sp</a> <span class="grammar-symbol">(</span><a href="#number">number</a><span class="grammar-symbol">|</span><a href="#quoted-string">quoted-string</a><span class="grammar-symbol">)</span></div></div>
|
||||
@ -185,6 +186,7 @@ Short description:
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="string-predicate">string-predicate</span><span class="grammar-usedby">(used by <a href="#predicate-func">predicate-func</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">isString</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="collection-predicate">collection-predicate</span><span class="grammar-usedby">(used by <a href="#predicate-func">predicate-func</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">isCollection</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="date-predicate">date-predicate</span><span class="grammar-usedby">(used by <a href="#predicate-func">predicate-func</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">isDate</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="iso-date-predicate">iso-date-predicate</span><span class="grammar-usedby">(used by <a href="#predicate-func">predicate-func</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">isIsoDate</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="predicate-value">predicate-value</span><span class="grammar-usedby">(used by <a href="#equal-predicate">equal-predicate</a>, <a href="#not-equal-predicate">not-equal-predicate</a>, <a href="#include-predicate">include-predicate</a>)</span></div><div class="grammar-rule-expression"> <a href="#boolean">boolean</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#multiline-string">multiline-string</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#null">null</a><br>
|
||||
@ -234,13 +236,13 @@ Short description:
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="multiline-string-escaped-char">multiline-string-escaped-char</span><span class="grammar-usedby">(used by <a href="#multiline-string-content">multiline-string-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">\</span> <span class="grammar-symbol">(</span><span class="grammar-literal">\</span><span class="grammar-symbol">|</span><span class="grammar-literal">b</span><span class="grammar-symbol">|</span><span class="grammar-literal">f</span><span class="grammar-symbol">|</span><span class="grammar-literal">n</span><span class="grammar-symbol">|</span><span class="grammar-literal">r</span><span class="grammar-symbol">|</span><span class="grammar-literal">t</span><span class="grammar-symbol">|</span><span class="grammar-literal">`</span><span class="grammar-symbol">|</span><span class="grammar-literal">u</span> <a href="#unicode-char">unicode-char</a><span class="grammar-symbol">)</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename">filename</span><span class="grammar-usedby">(used by <a href="#file-value">file-value</a>, <a href="#ca-certificate-option">ca-certificate-option</a>, <a href="#oneline-file">oneline-file</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><a href="#filename-content">filename-content</a><span class="grammar-symbol">|</span><a href="#template">template</a><span class="grammar-symbol">)</span><span class="grammar-symbol">*</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-content">filename-content</span><span class="grammar-usedby">(used by <a href="#filename">filename</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><a href="#filename-text">filename-text</a><span class="grammar-symbol">|</span><a href="#filename-escaped-char">filename-escaped-char</a><span class="grammar-symbol">)</span><span class="grammar-symbol">*</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-text">filename-text</span><span class="grammar-usedby">(used by <a href="#filename-content">filename-content</a>, <a href="#filename-password-content">filename-password-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-regex">~[#; \n\\]+</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-escaped-char">filename-escaped-char</span><span class="grammar-usedby">(used by <a href="#filename-content">filename-content</a>, <a href="#filename-password-content">filename-password-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">\</span> <span class="grammar-symbol">(</span><span class="grammar-literal">;</span><span class="grammar-symbol">|</span><span class="grammar-literal">#</span><span class="grammar-symbol">|</span><span class="grammar-regex">[ ]</span><span class="grammar-symbol">)</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-text">filename-text</span><span class="grammar-usedby">(used by <a href="#filename-content">filename-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-regex">~[#;{} \n\\]+</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-escaped-char">filename-escaped-char</span><span class="grammar-usedby">(used by <a href="#filename-content">filename-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">\</span> <span class="grammar-symbol">(</span><span class="grammar-literal">\</span><span class="grammar-symbol">|</span><span class="grammar-literal">b</span><span class="grammar-symbol">|</span><span class="grammar-literal">f</span><span class="grammar-symbol">|</span><span class="grammar-literal">n</span><span class="grammar-symbol">|</span><span class="grammar-literal">r</span><span class="grammar-symbol">|</span><span class="grammar-literal">t</span><span class="grammar-symbol">|</span><span class="grammar-literal">#</span><span class="grammar-symbol">|</span><span class="grammar-literal">;</span><span class="grammar-symbol">|</span><span class="grammar-literal"> </span><span class="grammar-symbol">|</span><span class="grammar-literal">{</span><span class="grammar-symbol">|</span><span class="grammar-literal">}</span><span class="grammar-symbol">|</span><span class="grammar-literal">u</span> <a href="#unicode-char">unicode-char</a><span class="grammar-symbol">)</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-password">filename-password</span><span class="grammar-usedby">(used by <a href="#client-certificate-option">client-certificate-option</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><a href="#filename-password-content">filename-password-content</a><span class="grammar-symbol">|</span><a href="#template">template</a><span class="grammar-symbol">)</span><span class="grammar-symbol">*</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-password-content">filename-password-content</span><span class="grammar-usedby">(used by <a href="#filename-password">filename-password</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><a href="#filename-text">filename-text</a><span class="grammar-symbol">|</span><a href="#filename-escaped-char">filename-escaped-char</a><span class="grammar-symbol">|</span><span class="grammar-literal">:</span><span class="grammar-symbol">|</span><a href="#password-text">password-text</a><span class="grammar-symbol">|</span><a href="#password-escaped-char">password-escaped-char</a><span class="grammar-symbol">)</span><span class="grammar-symbol">*</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="password-text">password-text</span><span class="grammar-usedby">(used by <a href="#filename-password-content">filename-password-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-regex">~[#; \n\\]+</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="password-escaped-char">password-escaped-char</span><span class="grammar-usedby">(used by <a href="#filename-password-content">filename-password-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">\</span> <span class="grammar-symbol">(</span><span class="grammar-literal">;</span><span class="grammar-symbol">|</span><span class="grammar-literal">#</span><span class="grammar-symbol">|</span><span class="grammar-regex">[ ]</span><span class="grammar-symbol">)</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="unicode-char">unicode-char</span><span class="grammar-usedby">(used by <a href="#quoted-string-escaped-char">quoted-string-escaped-char</a>, <a href="#key-string-escaped-char">key-string-escaped-char</a>, <a href="#value-string-escaped-char">value-string-escaped-char</a>, <a href="#oneline-string-escaped-char">oneline-string-escaped-char</a>, <a href="#multiline-string-escaped-char">multiline-string-escaped-char</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">{</span> <a href="#hexdigit">hexdigit</a><span class="grammar-symbol">+</span> <span class="grammar-literal">}</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-password-content">filename-password-content</span><span class="grammar-usedby">(used by <a href="#filename-password">filename-password</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-symbol">(</span><a href="#filename-password-text">filename-password-text</a><span class="grammar-symbol">|</span><a href="#filename-password-escaped-char">filename-password-escaped-char</a><span class="grammar-symbol">)</span><span class="grammar-symbol">*</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-password-text">filename-password-text</span><span class="grammar-usedby">(used by <a href="#filename-password-content">filename-password-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-regex">~[#;{} \n\\]+</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="filename-password-escaped-char">filename-password-escaped-char</span><span class="grammar-usedby">(used by <a href="#filename-password-content">filename-password-content</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">\</span> <span class="grammar-symbol">(</span><span class="grammar-literal">\</span><span class="grammar-symbol">|</span><span class="grammar-literal">b</span><span class="grammar-symbol">|</span><span class="grammar-literal">f</span><span class="grammar-symbol">|</span><span class="grammar-literal">n</span><span class="grammar-symbol">|</span><span class="grammar-literal">r</span><span class="grammar-symbol">|</span><span class="grammar-literal">t</span><span class="grammar-symbol">|</span><span class="grammar-literal">#</span><span class="grammar-symbol">|</span><span class="grammar-literal">;</span><span class="grammar-symbol">|</span><span class="grammar-literal"> </span><span class="grammar-symbol">|</span><span class="grammar-literal">{</span><span class="grammar-symbol">|</span><span class="grammar-literal">}</span><span class="grammar-symbol">|</span><span class="grammar-literal">u</span> <a href="#unicode-char">unicode-char</a><span class="grammar-symbol">)</span></div></div>
|
||||
<div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="unicode-char">unicode-char</span><span class="grammar-usedby">(used by <a href="#quoted-string-escaped-char">quoted-string-escaped-char</a>, <a href="#key-string-escaped-char">key-string-escaped-char</a>, <a href="#value-string-escaped-char">value-string-escaped-char</a>, <a href="#oneline-string-escaped-char">oneline-string-escaped-char</a>, <a href="#multiline-string-escaped-char">multiline-string-escaped-char</a>, <a href="#filename-escaped-char">filename-escaped-char</a>, <a href="#filename-password-escaped-char">filename-password-escaped-char</a>)</span></div><div class="grammar-rule-expression"><span class="grammar-literal">{</span> <a href="#hexdigit">hexdigit</a><span class="grammar-symbol">+</span> <span class="grammar-literal">}</span></div></div>
|
||||
</div><div class="grammar-ruleset"><h3 id="json">JSON</h3><div class="grammar-rule"><div class="grammar-rule-declaration"><span class="grammar-rule-id" id="json-value">json-value</span><span class="grammar-usedby">(used by <a href="#bytes">bytes</a>, <a href="#json-key-value">json-key-value</a>, <a href="#json-array">json-array</a>)</span></div><div class="grammar-rule-expression"> <a href="#template">template</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#json-object">json-object</a><br>
|
||||
<span class="grammar-symbol">|</span><a href="#json-array">json-array</a><br>
|
||||
|
@ -307,6 +307,7 @@ jsonpath "$.links" count == 12
|
||||
jsonpath "$.state" != null
|
||||
jsonpath "$.order" matches "^order-\\d{8}$"
|
||||
jsonpath "$.order" matches /^order-\d{8}$/ # Alternative syntax with regex literal
|
||||
jsonpath "$.created" isIsoDate
|
||||
```
|
||||
|
||||
[Doc](/docs/asserting-response.md#jsonpath-assert)
|
||||
|
@ -296,6 +296,7 @@ predicate-func:
|
||||
| string-predicate
|
||||
| collection-predicate
|
||||
| date-predicate
|
||||
| iso-date-predicate
|
||||
|
||||
equal-predicate: ("equals" | "==") sp predicate-value
|
||||
|
||||
@ -335,6 +336,8 @@ collection-predicate: "isCollection"
|
||||
|
||||
date-predicate: "isDate"
|
||||
|
||||
iso-date-predicate: "isIsoDate"
|
||||
|
||||
predicate-value:
|
||||
boolean
|
||||
| multiline-string
|
||||
|
Loading…
Reference in New Issue
Block a user