Skip to content

Commit

Permalink
change count to limit
Browse files Browse the repository at this point in the history
resolves #78
  • Loading branch information
cportele committed Mar 8, 2018
1 parent 21570ef commit 826c6fa
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 72 deletions.
2 changes: 1 addition & 1 deletion core/UML/ISO 191xx-1 Edition 1.xmi
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@
<UML:Expression body="0"/>
</UML:Parameter.defaultValue>
</UML:Parameter>
<UML:Parameter name="count" kind="in" visibility="public">
<UML:Parameter name="limit" kind="in" visibility="public">
<UML:Parameter.type>
<UML:Classifier xmi.idref="eaxmiid2"/>
</UML:Parameter.type>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: count
name: limit
in: query
description: >-
The optional count parameter limits the number of items that are presented in the response document.\
The optional limit parameter limits the number of items that are presented in the response document.\
Only items are counted that are on the first level of the collection in the response document.
Nested objects contained within the explicitly requested items shall not be counted.\
Expand All @@ -18,4 +18,4 @@ schema:
maximum: 10000
default: 10
style: form
explode: false
explode: false
54 changes: 27 additions & 27 deletions core/standard/clause_7_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ in the response are determined by the server based on parameters of the request.
A `bbox` parameter may be used to select only a subset of the features in
the collection (the features that are located in the bounding box).

The `count` parameter may be used to request only a subset of the
The `limit` parameter may be used to request only a subset of the
selected features and to indicate that the client wants to page through
the selected features of the collection.

Expand Down Expand Up @@ -655,18 +655,18 @@ the server SHALL support the HTTP GET operation at the path `/collections/{name}
CAUTION: link:https://github.com/opengeospatial/WFS_FES/issues/17[ISSUE 17] +
Precision level filter responsibility?

==== Parameter count
==== Parameter limit

[width="90%",cols="2,6a"]
|===
|*Requirement {counter:req-id}* |/req/core/fc-count-definition +
|*Requirement {counter:req-id}* |/req/core/fc-limit-definition +

Each feature collection operation SHALL support a parameter `count`
Each feature collection operation SHALL support a parameter `limit`
with the following characteristics (using an OpenAPI Specification 3.0 fragment):

[source,YAML]
----
name: count
name: limit
in: query
required: false
schema:
Expand All @@ -681,19 +681,19 @@ explode: false

[width="90%",cols="2,6a"]
|===
|*Permission {counter:per-id}* |/per/core/fc-count-default-maximum +
|*Permission {counter:per-id}* |/per/core/fc-limit-default-maximum +

The values for `maximum` and `default` in requirement `/req/core/fc-count-definition`
The values for `maximum` and `default` in requirement `/req/core/fc-limit-definition`
are only examples and MAY be changed.
|===

[width="90%",cols="2,6a"]
|===
|*Requirement {counter:req-id}* |/req/core/fc-count-response-1 +
|*Requirement {counter:req-id}* |/req/core/fc-limit-response-1 +

The response SHALL not contain more features than specified by the
optional `count` parameter. If the API definition specifies a maximum
value for `count` parameter, the response SHALL not contain more
optional `limit` parameter. If the API definition specifies a maximum
value for `limit` parameter, the response SHALL not contain more
features than this maximum value.

Only items are counted that are on the first level of the collection.
Expand All @@ -703,14 +703,14 @@ SHALL not be counted.

[width="90%",cols="2,6a"]
|===
|*Permission {counter:per-id}* |/per/core/fc-count-response-2 +
|*Permission {counter:per-id}* |/per/core/fc-limit-response-2 +

The server MAY return less features than requested (but not more).
|===

A template for the definition of the parameter in YAML according to
OpenAPI 3.0 is available at
link:https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/parameters/count.yaml[count.yaml].
link:https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/parameters/limit.yaml[limit.yaml].

==== Parameter bbox

Expand Down Expand Up @@ -832,20 +832,20 @@ HTTP status code "200".

The response will only include features selected by the request.

The number of features returned depends on the server and the parameter `count`:
The number of features returned depends on the server and the parameter `limit`:

* The client can request a count it is interested in.
* The server likely has a default value for the count, and a maximum limit.
* The client can request a limit it is interested in.
* The server likely has a default value for the limit, and a maximum limit.
* If the server has any more results available than it returns (the
number it returns is less than or equal to the requested/limited/default count)
number it returns is less than or equal to the requested/default/maximum limit)
then the server will include a link to the next set of results.

So (using the default/maximum values of 10/10000 from the OpenAPI
fragment in requirement `/req/core/fc-count-definition`):
fragment in requirement `/req/core/fc-limit-definition`):

* If you ask for 10, you will get 0 to 10 (as requested) and a `next` link,
if there are more.
* If you don't specify a count, you will get 0 to 10 (default) and a `next` link,
* If you don't specify a limit, you will get 0 to 10 (default) and a `next` link,
if there are more.
* If you ask for 50000, you might get up to 10000 (server-limited) and a `next`
link, if there are more.
Expand Down Expand Up @@ -922,7 +922,7 @@ of the feature collection.

.Links
=================
If the request is to return building features and "10" is the default `count`,
If the request is to return building features and "10" is the default `limit`,
the links in the response could be (in this example represented as link headers
and using an additional parameter `startIndex` to implement `next` links - and
the optional `prev` links):
Expand All @@ -944,23 +944,23 @@ Link: <http://data.example.org/collections/buildings/items.json?startIndex=0>; r
Link: <http://data.example.org/collections/buildings/items.json?startIndex=20>; rel="next"; type="application/geo+json"
----
If an explicit `count` of "50" is used, the links in the response could be:
If an explicit `limit` of "50" is used, the links in the response could be:
[source]
----
Link: <http://data.example.org/collections/buildings/items.json?count=50>; rel="self"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.html?count=50>; rel="alternate"; type="text/html"
Link: <http://data.example.org/collections/buildings/items.json?count=50&startIndex=50>; rel="next"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.json?limit=50>; rel="self"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.html?limit=50>; rel="alternate"; type="text/html"
Link: <http://data.example.org/collections/buildings/items.json?limit=50&startIndex=50>; rel="next"; type="application/geo+json"
----
Following the `next` link could return:
[source]
----
Link: <http://data.example.org/collections/buildings/items.json?count=50&startIndex=50>; rel="self"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.html?count=50&startIndex=50>; rel="alternate"; type="text/html"
Link: <http://data.example.org/collections/buildings/items.json?count=50&startIndex=0>; rel="prev"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.json?count=50&startIndex=100>; rel="next"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.json?limit=50&startIndex=50>; rel="self"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.html?limit=50&startIndex=50>; rel="alternate"; type="text/html"
Link: <http://data.example.org/collections/buildings/items.json?limit=50&startIndex=0>; rel="prev"; type="application/geo+json"
Link: <http://data.example.org/collections/buildings/items.json?limit=50&startIndex=100>; rel="next"; type="application/geo+json"
----
=================

Expand Down
2 changes: 1 addition & 1 deletion core/standard/clause_8_encodings.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ In the example below, only the first and tenth feature is shown. Coordinates are
"type" : "text/html",
"title" : "this document as HTML"
}, {
"href" : "http://data.example.com/collections/buildings/items/?f=json&startIndex=10&count=10",
"href" : "http://data.example.com/collections/buildings/items/?f=json&startIndex=10&limit=10",
"rel" : "next",
"type" : "application/geo+json",
"title" : "next page"
Expand Down
60 changes: 30 additions & 30 deletions docs/17-069.html
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ <h1>OGC Web Feature Service 3.0 - Part 1: Core</h1>
<li><a href="#_feature_collections">7.13. Feature collections</a>
<ul class="sectlevel3">
<li><a href="#_operation_4">7.13.1. Operation</a></li>
<li><a href="#_parameter_count">7.13.2. Parameter count</a></li>
<li><a href="#_parameter_limit">7.13.2. Parameter limit</a></li>
<li><a href="#_parameter_bbox">7.13.3. Parameter bbox</a></li>
<li><a href="#_parameters_for_filtering_on_feature_properties">7.13.4. Parameters for filtering on feature properties</a></li>
<li><a href="#_response_4">7.13.5. Response</a></li>
Expand Down Expand Up @@ -742,7 +742,7 @@ <h1>OGC Web Feature Service 3.0 - Part 1: Core</h1>
<p>Query operations allow features or values of feature properties to be retrieved from the underlying data store based upon selection criteria, defined by the client, on feature properties.</p>
</div>
<div class="paragraph">
<p>This standard defines the resources listed in the following table:</p>
<p>This standard defines the resources listed in the following Table 1:</p>
</div>
<table id="tldnr" class="tableblock frame-all grid-all spread">
<caption class="title">Table 1. Overview of resources, applicable HTTP methods and links to the document sections</caption>
Expand Down Expand Up @@ -1591,7 +1591,7 @@ <h3 id="_overview"><a class="anchor" href="#_overview"></a>7.1. Overview</h3>
the collection (the features that are located in the bounding box).</p>
</div>
<div class="paragraph">
<p>The <code>count</code> parameter may be used to request only a subset of the
<p>The <code>limit</code> parameter may be used to request only a subset of the
selected features and to indicate that the client wants to page through
the selected features of the collection.</p>
</div>
Expand Down Expand Up @@ -2565,7 +2565,7 @@ <h4 id="_operation_4"><a class="anchor" href="#_operation_4"></a>7.13.1. Operati
</div>
</div>
<div class="sect3">
<h4 id="_parameter_count"><a class="anchor" href="#_parameter_count"></a>7.13.2. Parameter count</h4>
<h4 id="_parameter_limit"><a class="anchor" href="#_parameter_limit"></a>7.13.2. Parameter limit</h4>
<table class="tableblock frame-all grid-all" style="width: 90%;">
<colgroup>
<col style="width: 25%;">
Expand All @@ -2575,15 +2575,15 @@ <h4 id="_parameter_count"><a class="anchor" href="#_parameter_count"></a>7.13.2.
<tr>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock"><strong>Requirement 17</strong></p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><div><div class="paragraph">
<p>/req/core/fc-count-definition<br></p>
<p>/req/core/fc-limit-definition<br></p>
</div>
<div class="paragraph">
<p>Each feature collection operation SHALL support a parameter <code>count</code>
<p>Each feature collection operation SHALL support a parameter <code>limit</code>
with the following characteristics (using an OpenAPI Specification 3.0 fragment):</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code data-lang="YAML"><span></span>name: count
<pre class="pygments highlight"><code data-lang="YAML"><span></span>name: limit
in: query
required: false
schema:
Expand All @@ -2607,10 +2607,10 @@ <h4 id="_parameter_count"><a class="anchor" href="#_parameter_count"></a>7.13.2.
<tr>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock"><strong>Permission 1</strong></p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><div><div class="paragraph">
<p>/per/core/fc-count-default-maximum<br></p>
<p>/per/core/fc-limit-default-maximum<br></p>
</div>
<div class="paragraph">
<p>The values for <code>maximum</code> and <code>default</code> in requirement <code>/req/core/fc-count-definition</code>
<p>The values for <code>maximum</code> and <code>default</code> in requirement <code>/req/core/fc-limit-definition</code>
are only examples and MAY be changed.</p>
</div></div></td>
</tr>
Expand All @@ -2625,12 +2625,12 @@ <h4 id="_parameter_count"><a class="anchor" href="#_parameter_count"></a>7.13.2.
<tr>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock"><strong>Requirement 18</strong></p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><div><div class="paragraph">
<p>/req/core/fc-count-response-1<br></p>
<p>/req/core/fc-limit-response-1<br></p>
</div>
<div class="paragraph">
<p>The response SHALL not contain more features than specified by the
optional <code>count</code> parameter. If the API definition specifies a maximum
value for <code>count</code> parameter, the response SHALL not contain more
optional <code>limit</code> parameter. If the API definition specifies a maximum
value for <code>limit</code> parameter, the response SHALL not contain more
features than this maximum value.</p>
</div>
<div class="paragraph">
Expand All @@ -2650,7 +2650,7 @@ <h4 id="_parameter_count"><a class="anchor" href="#_parameter_count"></a>7.13.2.
<tr>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><p class="tableblock"><strong>Permission 2</strong></p></td>
<td class="tableblock halign-left valign-top" style="background-color: #FFFFFF;"><div><div class="paragraph">
<p>/per/core/fc-count-response-2<br></p>
<p>/per/core/fc-limit-response-2<br></p>
</div>
<div class="paragraph">
<p>The server MAY return less features than requested (but not more).</p>
Expand All @@ -2661,7 +2661,7 @@ <h4 id="_parameter_count"><a class="anchor" href="#_parameter_count"></a>7.13.2.
<div class="paragraph">
<p>A template for the definition of the parameter in YAML according to
OpenAPI 3.0 is available at
<a href="https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/parameters/count.yaml">count.yaml</a>.</p>
<a href="https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/parameters/limit.yaml">limit.yaml</a>.</p>
</div>
</div>
<div class="sect3">
Expand Down Expand Up @@ -2858,26 +2858,26 @@ <h4 id="_response_4"><a class="anchor" href="#_response_4"></a>7.13.5. Response<
<p>The response will only include features selected by the request.</p>
</div>
<div class="paragraph">
<p>The number of features returned depends on the server and the parameter <code>count</code>:</p>
<p>The number of features returned depends on the server and the parameter <code>limit</code>:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The client can request a count it is interested in.</p>
<p>The client can request a limit it is interested in.</p>
</li>
<li>
<p>The server likely has a default value for the count, and a maximum limit.</p>
<p>The server likely has a default value for the limit, and a maximum limit.</p>
</li>
<li>
<p>If the server has any more results available than it returns (the
number it returns is less than or equal to the requested/limited/default count)
number it returns is less than or equal to the requested/default/maximum limit)
then the server will include a link to the next set of results.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>So (using the default/maximum values of 10/10000 from the OpenAPI
fragment in requirement <code>/req/core/fc-count-definition</code>):</p>
fragment in requirement <code>/req/core/fc-limit-definition</code>):</p>
</div>
<div class="ulist">
<ul>
Expand All @@ -2886,7 +2886,7 @@ <h4 id="_response_4"><a class="anchor" href="#_response_4"></a>7.13.5. Response<
if there are more.</p>
</li>
<li>
<p>If you don&#8217;t specify a count, you will get 0 to 10 (default) and a <code>next</code> link,
<p>If you don&#8217;t specify a limit, you will get 0 to 10 (default) and a <code>next</code> link,
if there are more.</p>
</li>
<li>
Expand Down Expand Up @@ -3052,7 +3052,7 @@ <h4 id="_response_4"><a class="anchor" href="#_response_4"></a>7.13.5. Response<
<div class="title">Example 7. Links</div>
<div class="content">
<div class="paragraph">
<p>If the request is to return building features and "10" is the default <code>count</code>,
<p>If the request is to return building features and "10" is the default <code>limit</code>,
the links in the response could be (in this example represented as link headers
and using an additional parameter <code>startIndex</code> to implement <code>next</code> links - and
the optional <code>prev</code> links):</p>
Expand All @@ -3076,24 +3076,24 @@ <h4 id="_response_4"><a class="anchor" href="#_response_4"></a>7.13.5. Response<
</div>
</div>
<div class="paragraph">
<p>If an explicit <code>count</code> of "50" is used, the links in the response could be:</p>
<p>If an explicit <code>limit</code> of "50" is used, the links in the response could be:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code>Link: &lt;http://data.example.org/collections/buildings/items.json?count=50&gt;; rel="self"; type="application/geo+json"
Link: &lt;http://data.example.org/collections/buildings/items.html?count=50&gt;; rel="alternate"; type="text/html"
Link: &lt;http://data.example.org/collections/buildings/items.json?count=50&amp;startIndex=50&gt;; rel="next"; type="application/geo+json"</code></pre>
<pre class="pygments highlight"><code>Link: &lt;http://data.example.org/collections/buildings/items.json?limit=50&gt;; rel="self"; type="application/geo+json"
Link: &lt;http://data.example.org/collections/buildings/items.html?limit=50&gt;; rel="alternate"; type="text/html"
Link: &lt;http://data.example.org/collections/buildings/items.json?limit=50&amp;startIndex=50&gt;; rel="next"; type="application/geo+json"</code></pre>
</div>
</div>
<div class="paragraph">
<p>Following the <code>next</code> link could return:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="pygments highlight"><code>Link: &lt;http://data.example.org/collections/buildings/items.json?count=50&amp;startIndex=50&gt;; rel="self"; type="application/geo+json"
Link: &lt;http://data.example.org/collections/buildings/items.html?count=50&amp;startIndex=50&gt;; rel="alternate"; type="text/html"
Link: &lt;http://data.example.org/collections/buildings/items.json?count=50&amp;startIndex=0&gt;; rel="prev"; type="application/geo+json"
Link: &lt;http://data.example.org/collections/buildings/items.json?count=50&amp;startIndex=100&gt;; rel="next"; type="application/geo+json"</code></pre>
<pre class="pygments highlight"><code>Link: &lt;http://data.example.org/collections/buildings/items.json?limit=50&amp;startIndex=50&gt;; rel="self"; type="application/geo+json"
Link: &lt;http://data.example.org/collections/buildings/items.html?limit=50&amp;startIndex=50&gt;; rel="alternate"; type="text/html"
Link: &lt;http://data.example.org/collections/buildings/items.json?limit=50&amp;startIndex=0&gt;; rel="prev"; type="application/geo+json"
Link: &lt;http://data.example.org/collections/buildings/items.json?limit=50&amp;startIndex=100&gt;; rel="next"; type="application/geo+json"</code></pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -3573,7 +3573,7 @@ <h3 id="_requirement_class_geojson"><a class="anchor" href="#_requirement_class_
&quot;type&quot; : &quot;text/html&quot;,
&quot;title&quot; : &quot;this document as HTML&quot;
}, {
&quot;href&quot; : &quot;http://data.example.com/collections/buildings/items/?f=json&amp;startIndex=10&amp;count=10&quot;,
&quot;href&quot; : &quot;http://data.example.com/collections/buildings/items/?f=json&amp;startIndex=10&amp;limit=10&quot;,
&quot;rel&quot; : &quot;next&quot;,
&quot;type&quot; : &quot;application/geo+json&quot;,
&quot;title&quot; : &quot;next page&quot;
Expand Down
Loading

0 comments on commit 826c6fa

Please sign in to comment.