You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of this should go on some sort of best practices guide
on the web site. This cuts quite a bit of text, and merges
the static analysis appendix into the API appendex as API-wide
processing is the main use case for such analysis.
There is likely more to cut, and perhaps the entire appendix
should be removed, but I'd like to get some feedback on this
level of information first.
Copy file name to clipboardExpand all lines: jsonschema-hyperschema.xml
+33-88Lines changed: 33 additions & 88 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@
13
13
<!ENTITYrfc6901 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6901.xml">
14
14
<!ENTITYrfc7230 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7230.xml">
15
15
<!ENTITYrfc7231 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7231.xml">
16
+
<!ENTITYrfc7807 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7807.xml">
16
17
<!ENTITYI-D.nottingham-rfc5988bis SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-nottingham-rfc5988bis-08.xml">
17
18
<!ENTITYI-D.luff-relative-json-pointer SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-luff-relative-json-pointer-00.xml">
18
19
<!ENTITYI-D.reschke-http-jfv SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-reschke-http-jfv-06.xml">
@@ -1347,6 +1348,7 @@ for varname in templateData:
1347
1348
&rfc6573;
1348
1349
&rfc7230;
1349
1350
&rfc7231;
1351
+
&rfc7807;
1350
1352
&I-D.nottingham-rfc5988bis;
1351
1353
</references>
1352
1354
<sectiontitle="JSON Hyper-Schema and HTTP"anchor="HTTP">
@@ -1487,18 +1489,10 @@ for varname in templateData:
1487
1489
style, enable the creation of generic user agents. Such a user agent
1488
1490
has no application-specific knowledge. Rather, it understands pre-defined
1489
1491
media types, URI schemes, protocols, and link relations, often by recognizing
1490
-
these and coordinating the use of existing software that implement support
1491
-
for them. Applications can then be built on top of such a user agent, focusing
1492
-
on their own semantics and logic rather than the mechanics of the interactions.
1493
-
</t>
1494
-
<t>
1495
-
JSON Hyper-Schema is ideal for representing individual resources in hypermedia
1496
-
APIs. It offers comprehensive capabilities for describing how to use hyperlinks
1497
-
to interact with the current resource (through "self" links), or related
1498
-
resources. Using a hyper-schema-based API involves traversing links from
1499
-
one resource to the next, interacting with resources through their
1500
-
representations as described by the target keywords, or submitting data
1501
-
to resources for processing using the submission keywords.
1492
+
these and coordinating the use of existing software that implements support
1493
+
for them. Client applications can then be built on top of such a user agent,
1494
+
focusing on their own semantics and logic rather than the mechanics of the
1495
+
interactions.
1502
1496
</t>
1503
1497
<t>
1504
1498
Hyper-schema is only concerned with one resource and set of associated links
@@ -1508,35 +1502,12 @@ for varname in templateData:
1508
1502
any concept of whether or how that resource fits into an API.
1509
1503
</t>
1510
1504
<t>
1511
-
While aspects of cross-cutting API concerns such as authentication
1512
-
and authorization may be described in hyper-schema, for instance in
1513
-
the headerSchema of a link, defining an API-wide approach to any
1514
-
cross-cutting concerns is beyond the scope of hyper-schema.
1505
+
Therefore, hyper-schema is suitable for use within an API, but is not suitable
1506
+
for the description of APIs as complete entities in their own right. There is
1507
+
no way to describe concepts at the API scope, rather than the resource and
1508
+
link scope, and such descriptions are outside of the boundaries
1509
+
of JSON Hyper-Schema.
1515
1510
</t>
1516
-
<sectiontitle="Separation of concerns">
1517
-
<t>
1518
-
Working with a JSON Hyper-Schema-based API will generally involve
1519
-
three components: The hyper-schema implementation, a generic user agent,
1520
-
and a client application. The hyper-schema implementation's requirements
1521
-
are given in this specification. The generic user agent handles standardized
1522
-
URI schemes, protocols, and media types. User agents that handle HTTP,
1523
-
HTTPS, and JSON, for instance, are available as libraries in many programming
1524
-
languages.
1525
-
</t>
1526
-
<t>
1527
-
The client application has the domain-specific knowledge of link relation
1528
-
types and data structure fields needed to make use of the specific API.
1529
-
A client application can use an available user agent library and a hyper-schema
1530
-
implementation separately. Alternatively, extensible user agents can allow
1531
-
adding hyper-schema support as a plug-in alongside support for plain JSON, XML,
1532
-
or other media types.
1533
-
</t>
1534
-
<t>
1535
-
<cref>
1536
-
Add something about generic user agents not being magic, HATEOAS, etc.
1537
-
</cref>
1538
-
</t>
1539
-
</section>
1540
1511
<sectiontitle="Resource evolution with Hyper-Schema">
1541
1512
<t>
1542
1513
Since a given JSON Hyper-Schema is used with a single resource at a single
@@ -1552,67 +1523,41 @@ for varname in templateData:
1552
1523
can then make use of the hyper-schema that it recognizes, and ignore newer
1553
1524
or older versions.
1554
1525
</t>
1555
-
<t>
1556
-
Note that this notion of changing the representaiton version using
1557
-
successive hyper-schemas is separate from deprecating an entire resource
1558
-
and either removing it or replacing it with a new resource at a new URI.
1559
-
The "targetHints" keyword can be used to convey deprecation information.
1560
-
</t>
1561
-
<t>
1562
-
<cref>
1563
-
This section is something of a placeholder, with the goal being to
1564
-
get readers to understand that while hyper-schema helps with versioning,
1565
-
it does not and will not have explicit features to support it.
1566
-
</cref>
1567
-
</t>
1568
-
</section>
1569
-
<sectiontitle="Entry point resource">
1570
-
<t>
1571
-
To create an entry point for an API, it is RECOMMENDED to provide
1572
-
a resource at a documented entry point URI with the minimal amount of data
1573
-
necessary to begin interacting with API resources.
1574
-
The hyper-schema for this resource SHOULD contain links to all
1575
-
API resources that can be accessed with only user input and/or
1576
-
data contained in the entry point resource's representation.
1577
-
</t>
1578
1526
</section>
1579
1527
<sectiontitle="Responses and errors">
1580
1528
<t>
1581
1529
Because a hyper-schema represents a single resource at a time, it does not
1582
1530
provide for an enumeration of all possible responses to protocol operations
1583
1531
performed with links. Each response, including errors, is considered
1584
1532
its own (possibly anonymous) resource, and should identify its own
1585
-
hyper-schema to allow the user agent or client application to interpret any
1533
+
hyper-schema, and optionally use an appropriate media type such as
0 commit comments