Skip to content

Commit

Permalink
$top and $skip are numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Jun 24, 2024
1 parent 61afac9 commit c8dfaac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/odata-url-conventions/odata-url-conventions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ <h2 id="417-passing-query-options-in-the-request-body"><a name="PassingQueryOpti
<pre><code>GET http://host/service/People?
$filter=LastName%20eq%20&#39;P%26G&#39;&amp;$select=FirstName,LastName</code></pre>
</div>
<p>With <code>Content-Type: application/json</code> query options and function parameters are encoded in a request body that represents a JSON object. Its members include the individual query options. Their name MUST have the <code>$</code> prefix and their value MUST be given as a string or a number, as appropriate.</p>
<p>With <code>Content-Type: application/json</code> query options and function parameters are encoded in a request body that represents a JSON object. Its members include the individual query options. Their name MUST have the <code>$</code> prefix and their value MUST be given as a string, except for <code>$top</code> and <code>$skip</code> where it MUST be a number.</p>
<p>Members of the JSON object also include parameters if the resource path is a function invocation or function import. In this case parameters MUST be represented like parameters in an action invocation <a href="#ODataJSON">OData-JSON, section 18</a>, and in the resource path the parentheses after the function name MUST be omitted and the <code>/$query</code> segment MAY be omitted.</p>
<div class="example">
<p>Example 52: An employee’s top 10 leave requests for the next two weeks pending their manager’s approval. Compare this with <a href="#funcexpr">example 30</a>.</p>
Expand Down
3 changes: 2 additions & 1 deletion docs/odata-url-conventions/odata-url-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,8 @@ GET http://host/service/People?
With `Content-Type: application/json` query options and function parameters are
encoded in a request body that represents a JSON object. Its members include the
individual query options. Their name MUST have the `$` prefix and their
value MUST be given as a string or a number, as appropriate.
value MUST be given as a string, except for `$top` and `$skip` where it MUST be
a number.

Members of the JSON object also include parameters
if the resource path is a function invocation or function import. In this case
Expand Down
3 changes: 2 additions & 1 deletion odata-url-conventions/4 Resource Path.md
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,8 @@ GET http://host/service/People?
With `Content-Type: application/json` query options and function parameters are
encoded in a request body that represents a JSON object. Its members include the
individual query options. Their name MUST have the `$` prefix and their
value MUST be given as a string or a number, as appropriate.
value MUST be given as a string, except for `$top` and `$skip` where it MUST be
a number.

Members of the JSON object also include parameters
if the resource path is a function invocation or function import. In this case
Expand Down

0 comments on commit c8dfaac

Please sign in to comment.