- From: Deian Tabakov <DTabakov@slb.com>
- Date: Fri, 22 Jan 2016 03:39:44 +0000
- To: "public-hydra@w3.org" <public-hydra@w3.org>
- Message-ID: <075E21DDA4D0F24DBC21BC36C1DE9BBB30503538@NL0230MBX02N1.DIR.slb.com>
Greetings hydraphils, I have been studying Hydra on my own for the last few month. Finally, I hit an issue that my search-fu cannot resolve. Hydra supports Collections, but as far as I can tell, their members are not described. For example (using Markus’ demo api) the /users request is documented as “returns a Collection”. A client would not have apriori knowledge about the types of elements in the collection. The type can only be determined by consuming the collection and examining each element. The dual problem is when one wants to specify that a POST operation expects as input a collection of vocab:User. Hydra can express that the expected input is a Collection, but I cannot find a way to specify the expected type of the members. One solution might be to derive a sub class of hydra:Collection (say, "TypedCollection") and explicitly specify the expected member type (say, defining an "expectedMemberType" property). This would be informative (to a human user of the API) but as far as I understand the theory behind, it would not be normative. A standard JSON-LD parser would see "expectedMemberType" as a property of "TypedCollection", and would not be able to deduce the intended constraint on the types of the members. Any hints how to do this? Thanks, Deian -- Deian Tabakov Software Engineer Schlumberger (SIS) Houston Technology Center 1-713-513-3768 http://www.software.slb.com/products/foundation/Pages/pipesim.aspx
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Friday, 22 January 2016 08:33:24 UTC