spechub / Hets

The Heterogeneous Tool Set
http://hets.eu
GNU General Public License v2.0
56 stars 18 forks source link

syntax for HETS API extensions #1561

Open mcodescu opened 8 years ago

mcodescu commented 8 years ago
tillmo commented 8 years ago

sounds good! A smooth extension of what is already there.

cmaeder commented 8 years ago

The leading "dg" was supposed to indicate that you would get a development graph, so maybe "theory" should be used in the first two cases (that may require node=iri to be in the query part or would only output the theory of the first or a solitary node).

tillmo commented 8 years ago

Agreed. A translation of the (full) theory of a node in a DG along a composition of comorphisms would be written GET /theory/coded-iri/command-list?options&node=iri&translation=iri1;...;irin @clange, is the semicolon legal for separating IRIs?

clange commented 8 years ago

According to RFC 3986 the semicolon is legal. However, for this same reason, it might occur in any of the iri1 to irin. If it occurs there it will have to be escaped as %3B, which shouldn't be a problem.

FYI, IIRC Florian Rabe makes a lot of use of ; in his MMT API.

eugenk commented 8 years ago

& and ; in a query string of an IRI have the same semantics/are interchangeable. We should not redefine the semantics of ; in the Hets API. Maybe a better solution would be to use another HTTP-verb than GET and supply the options in the request body.

eugenk commented 8 years ago

... or simply to use a , like in the command line:

 ❯ hets --help
Usage: hets [OPTION ...] [FILE ...] [+RTS -?]
[...]
  -t TRANS      --translation=TRANS     translation option
                                          is a colon-separated list
                                          of one or more from: SIMPLE-ID
tillmo commented 8 years ago

Good, a comma is a good idea.