Skip to content

Commit 6da7ee4

Browse files
committed
Update sections with new field documentation format (#157, #173)
- Always specify `required` or `optional`, remove their definitions - Unify wording of the descriptions (`a`, `the`, `non-empty`, etc.) - Extract suggest metadata object from manifest to separate section
1 parent a74c0a9 commit 6da7ee4

File tree

1 file changed

+41
-53
lines changed

1 file changed

+41
-53
lines changed

1.0-draft/index.html

Lines changed: 41 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ <h2>Core Concepts</h2>
265265
</p>
266266
<h3 data-link-for="conventions">Terms Used</h3>
267267
<p>
268-
The following concepts are used and borrowed from JSON [[RFC8259]] syntax as well as from [[RFC2119]]:
268+
The following concepts are used and borrowed from JSON [[RFC8259]]:
269269
<ul>
270270
<li>
271271
<dfn data-lt="json object">Object</dfn>
@@ -294,20 +294,6 @@ <h3 data-link-for="conventions">Terms Used</h3>
294294
<dfn>Boolean</dfn>
295295
- A <a data-cite="RFC8259#section-3">JSON value</a> that is either <code>true</code> or <code>false</code>.
296296
</li>
297-
298-
<li>
299-
<!-- "required" is not a defined term since it is a default and unused currently.
300-
So, we just make it bold italics to provide a similar style as defined terms.
301-
-->
302-
( <b><i>required</i></b> ) - is the default and might be shown at times to signify those fields which are mandatory and MUST be used in all reconciliation services.
303-
If the field is not specified as either ( <b>required</b> ) or ( <b>optional</b> ), then it is REQUIRED.
304-
</li>
305-
<li>
306-
(<dfn
307-
data-lt="NOT MANDATORY|NON-MANDATORY">
308-
optional
309-
</dfn>) - is used to signify those fields which are not mandatory and MAY be used.
310-
</li>
311297
</ul>
312298
</p>
313299
</p>
@@ -318,15 +304,15 @@ <h3 data-link-for="entities">Entities</h3>
318304
It comprises the following fields:
319305
<dl>
320306
<dt><code>id</code></dt>
321-
<dd>{{String}} a non-empty identifier. This identifier must be unique among all entities;</dd>
307+
<dd>{{String}} (required) a non-empty identifier. This identifier must be unique among all entities;</dd>
322308
<dt><code>name</code></dt>
323-
<dd>{{String}} ({{optional}}) a non-empty <emph>name</emph> or <emph></emph>label</emph> for the entity;</dd>
309+
<dd>{{String}} (optional) a non-empty <emph>name</emph> or <emph></emph>label</emph> for the entity;</dd>
324310
<dt><code>description</code></dt>
325-
<dd>{{String}} ({{optional}}) a <emph>description</emph> as a human-readable string;</dd>
311+
<dd>{{String}} (optional) a <emph>description</emph> as a human-readable string;</dd>
326312
<dt><code>image</code></dt>
327-
<dd>{{String}} ({{optional}}) a URL of an <emph>image</emph> which illustrates the entity;</dd>
313+
<dd>{{String}} (optional) a URL of an <emph>image</emph> which illustrates the entity;</dd>
328314
<dt><code>type</code></dt>
329-
<dd>{{Array}} ({{optional}}) list of <a>types</a>, possibly empty, the entity is classified by;</dd>
315+
<dd>{{Array}} (optional) a list of <a>types</a>, possibly empty, the entity is classified by.</dd>
330316
</dl>
331317
Moreover, for each <a>property</a> the entity contains a set of associated <a>property values</a>, possibly empty.
332318
</p>
@@ -356,11 +342,11 @@ <h3 data-link-for="types">Types</h3>
356342
It comprises the following fields:
357343
<dl>
358344
<dt><code>id</code></dt>
359-
<dd>{{String}} an identifier, which is non-empty. This identifier must be unique among all types;</dd>
345+
<dd>{{String}} (required) a non-empty identifier. This identifier must be unique among all types;</dd>
360346
<dt><code>name</code></dt>
361-
<dd>{{String}} ({{optional}}) a human-readable name, which is non-empty;</dd>
347+
<dd>{{String}} (optional) a non-empty human-readable name;</dd>
362348
<dt><code>broader</code></dt>
363-
<dd>{{Array}} ({{optional}}) list of <a>types</a>, each representing a direct (i.e., immediate) <a href="https://www.w3.org/TR/skos-reference/#semantic-relations">broader</a> [[skos-reference]] category of <a>entities</a>.</dd>
349+
<dd>{{Array}} (optional) a list of <a>types</a>, each representing a direct (i.e., immediate) <a href="https://www.w3.org/TR/skos-reference/#semantic-relations">broader</a> [[skos-reference]] category of <a>entities</a>.</dd>
364350
</dl>
365351
</p>
366352
</section>
@@ -371,9 +357,9 @@ <h3 data-link-for="properties">Properties</h3>
371357
It comprises the following fields:
372358
<dl>
373359
<dt><code>id</code></dt>
374-
<dd>{{String}} an identifier, which is a non-empty string. This identifier must be unique among all properties;</dd>
360+
<dd>{{String}} (required) a non-empty identifier. This identifier must be unique among all properties;</dd>
375361
<dt><code>name</code></dt>
376-
<dd>{{String}} ({{optional}}) a human-readable name, which is a non-empty string.</dd>
362+
<dd>{{String}} (optional) a non-empty human-readable name.</dd>
377363
</dl>
378364
</p>
379365
</section>
@@ -411,48 +397,39 @@ <h3 data-lt="manifest">Service Manifest</h3>
411397
A <dfn>service manifest</dfn> consists of the following {{fields}}:
412398
<dl>
413399
<dt><code>versions</code></dt>
414-
<dd>{{Array}} API versions supported by the endpoint, such as <code>["0.1", "0.2", "1.0-draft"]</code>. Since this field did not exist in version 0.1, services which do not declare a <code>versions</code> field are expected to only support version 0.1.</dd>
400+
<dd>{{Array}} (required) a list of API versions supported by the endpoint, such as <code>["0.1", "0.2", "1.0-draft"]</code>. Since this field did not exist in version 0.1, services which do not declare a <code>versions</code> field are expected to only support version 0.1.</dd>
415401
<dt><code>name</code></dt>
416-
<dd>{{String}} A human-readable name for the service, generally the name of the database it exposes. In the case where multiple reconciliation services exist for the same database, it is in the interest of a service to bear a meaningful name which
402+
<dd>{{String}} (required) a human-readable name for the service, generally the name of the database it exposes. In the case where multiple reconciliation services exist for the same database, it is in the interest of a service to bear a meaningful name which
417403
will help disambiguating it from others;</dd>
418404
<dt><code>defaultTypes</code></dt>
419-
<dd>{{Array}} ({{optional}}) list of <a>types</a> which are considered sensible default choices as types supplied in reconciliation queries. For services which do not rely on types, this MAY contain a single type with a generic name making it clear that all entities in the
420-
database are instances of this type.<dd>
405+
<dd>{{Array}} (optional) a list of <a>types</a> which are considered sensible default choices as types supplied in reconciliation queries. For services which do not rely on types, this MAY contain a single type with a generic name making it clear that all entities in the
406+
database are instances of this type.</dd>
421407
<dt><code>documentation</code></dt>
422-
<dd>{{String}} ({{optional}}) URL that points to human-readable documentation about the service, for instance giving more information about the data it exposes;</dd>
408+
<dd>{{String}} (optional) a URL that points to human-readable documentation about the service, for instance giving more information about the data it exposes;</dd>
423409
<dt><code>logo</code></dt>
424-
<dd>{{String}} ({{optional}}) URL that points to a square image which can be used as the service's logo;</dd>
410+
<dd>{{String}} (optional) a URL that points to a square image which can be used as the service's logo;</dd>
425411
<dt><code>serviceVersion</code></dt>
426-
<dd>{{String}} ({{optional}}) describes the version of the software exposing this service. This is not to be confused with <code>versions</code> which is about the versions of the reconciliation API supported by the service;</dd>
412+
<dd>{{String}} (optional) a version of the software exposing this service. This is not to be confused with <code>versions</code> which is about the versions of the reconciliation API supported by the service;</dd>
427413
<dt><code>view</code></dt>
428-
<dd>{{Object}} contains a single field URL. Its value is a <a>URI template</a> for <a>entities</a>;</dd>
414+
<dd>{{Object}} (required) a <a>URI template</a> for viewing <a>entities</a>;</dd>
429415
<dt><code>featureView</code></dt>
430-
<dd>{{Object}} ({{optional}}) contains a single field URL. Its value is a <a>URI template</a> for <a>matching features</a>;</dd>
416+
<dd>{{Object}} (optional) a <a>URI template</a> for viewing <a>matching features</a>;</dd>
431417
<dt><code>preview</code></dt>
432-
<dd>{{Object}} ({{optional}}) contains <a>preview metadata</a> supplied if the service offers a <a href="#preview-service">preview service</a>;</dd>
418+
<dd>{{Object}} (optional) the <a>preview metadata</a>, supplied if the service offers a <a href="#preview-service">preview service</a>;</dd>
433419
<dt><code>suggest</code></dt>
434-
<dd>{{Object}} ({{optional}}) contains the following fields, depending on which <a href="#suggest-services">suggest services</a> are offered:
435-
<dl>
436-
<dt><code>entity</code></dt>
437-
<dd>{{Boolean}} ({{optional}}) indicates if the service supports auto-suggestion of <a>entities</a>;</dd>
438-
<dt><code>property</code></dt>
439-
<dd>{{Boolean}} ({{optional}}) indicates if the service supports auto-suggestion of <a>properties</a>;</dd>
440-
<dt><code>type</code></dt>
441-
<dd>{{Boolean}} ({{optional}}) indicates if the service supports auto-suggestion of <a>types</a>;</dd>
442-
</dl>
443-
</dd>
420+
<dd>{{Object}} (optional) the <a>suggest metadata</a>, supplied if the service offers <a href="#suggest-services">suggest services</a>;</dd>
444421
<dt><code>extend</code></dt>
445-
<dd>{{Object}} ({{optional}}) contains <a>data extension metadata</a>, supplied if the service offers a <a href="#data-extension-service">data extension service</a>.</dd>
422+
<dd>{{Object}} (optional) the <a>data extension metadata</a>, supplied if the service offers a <a href="#data-extension-service">data extension service</a>;</dd>
446423
<dt><code>batchSize</code></dt>
447-
<dd>{{Integer}} ({{optional}}) The maximum number of <a>reconciliation queries</a> in a single <a>reconciliation query batch</a>. The service MAY respond to batches larger than this number with a 413 HTTP error status code [[RFC7231]]</dd>
424+
<dd>{{Integer}} (optional) the maximum number of <a>reconciliation queries</a> in a single <a>reconciliation query batch</a>. The service MAY respond to batches larger than this number with a 413 HTTP error status code [[RFC7231]];</dd>
448425
<dt><code>authentication</code></dt>
449-
<dd>{{Object}} ({{optional}}) A <a>security scheme</a>, supplied if the service supports <a href="#authentication">authentication</a>.</dd>
426+
<dd>{{Object}} (optional) the <a>security scheme</a> used by this service, supplied if the service supports <a href="#authentication">authentication</a>;</dd>
450427
<dt><code>lang</code></dt>
451-
<dd>{{String}} ({{optional}}) value for the default <a href="#text-processing-language">text-processing language</a> used by this service.</dd>
428+
<dd>{{String}} (optional) the default <a href="#text-processing-language">text-processing language</a> used by this service;</dd>
452429
<dt><code>dir</code></dt>
453-
<dd>{{String}} ({{optional}}) value for the default <a href="#text-direction">text direction</a> used by this service.</dd>
430+
<dd>{{String}} (optional) the default <a href="#text-direction">text direction</a> used by this service;</dd>
454431
<dt><code>standardizedScore</code></dt>
455-
<dd>{{Integer}} ({{optional}}) indicating if the service returns values between 0 and 100 (inclusive) in the <code>score</code> field of <a>reconciliation candidates</a>. This enables clients to process and display candidates accordingly, e.g. with score percentages or visualizations.</dd>
432+
<dd>{{Boolean}} (optional) indicates if the service returns values between 0 and 100 (inclusive) in the <code>score</code> field of <a>reconciliation candidates</a>. This enables clients to process and display candidates accordingly, e.g. with score percentages or visualizations.</dd>
456433
</dl>
457434
</p>
458435
<p>For instance, a service could expose the following minimal service manifest:
@@ -768,10 +745,21 @@ <h2>Suggest Services</h2>
768745
endpoints for their <a>entities</a>, <a>properties</a> and <a>types</a>.
769746
A reconciliation service can offer a <dfn>suggest service</dfn> for any of these three classes. For instance, a service which only exposes a single type might not want to expose a suggest service for types.
770747
These suggest services can be used by clients to let users select an entity, property or type manually, at various stages of their reconciliation workflows.
771-
Suggest services for entities, properties and types are declared independently
772-
in the <a>service manifest</a>.
773748
</p>
774749
<section>
750+
<h3><dfn>Suggest Metadata</dfn></h3>
751+
<p>Suggest services for entities, properties and types are declared independently in the <code>suggest</code> field of the <a>service manifest</a>, using the following fields:
752+
<dl>
753+
<dt><code>entity</code></dt>
754+
<dd>{{Boolean}} (optional) indicates if the service supports auto-suggestion of <a>entities</a>;</dd>
755+
<dt><code>property</code></dt>
756+
<dd>{{Boolean}} (optional) indicates if the service supports auto-suggestion of <a>properties</a>;</dd>
757+
<dt><code>type</code></dt>
758+
<dd>{{Boolean}} (optional) indicates if the service supports auto-suggestion of <a>types</a>;</dd>
759+
</dl>
760+
</p>
761+
</section>
762+
<section>
775763
<h3>Suggest Endpoints</h3>
776764
<p>
777765
When supported, the suggest endpoints are located at the following URIs, relative to the service's root <a>endpoint</a>:

0 commit comments

Comments
 (0)