Description
The current LDO conflates link existence with operations. This is often misleading (especially because"method": "get"
doesn't mean quite what most people would think, and "method": "post"
can mean things other than POST even with HTTP.
This behavior mostly comes from HTML forms. However, discussions here have proven that HTML is neither a good role model for detailed linking, nor do analogies with HTML reliably clarify things for folks (although that might be just me).
A better approach would be to have an array of Operation Description Objects (ODOs) within each Link Description Object (LDO). Here's a partial meta-schema for ODOs
{
"type": "object",
"properties": {
"title": {"type": "string"},
"description": {"type": "string"},
"submission": {"type": "object", "properties": ...},
"target": {"type": "object", "properties": ...},
}
}
submission
and target
could alternately be called request
and response
. They gather all keywords relevant to submissions/requests and targets/responses respectively. I will file separate issues for discussing exactly what goes in there- the minimal thing would just be to move the current submission and target keywords into these objects.
title
and description
do what they usually do.
See also issues #94 (replace method
with behavioral keywords), #73 (for an allow
hint), and #92 (referring to JSON Home's hint mechanism). I will also file a separate issue to look at how all of these proposals, as well as the forthcoming submission and response proposals, might fit together.