- From: GoutisD <gts.dmtr@gmail.com>
- Date: Sat, 8 Apr 2017 14:44:57 +0300
- To: public-hydra@w3.org
- Message-ID: <CAMy19+=OdQvdDvMg13NKqJRi+LxsM7dWyuHKPW83j06TXK_KNg@mail.gmail.com>
Hello,
I was wondering why the hydra:search is not part of the main api
documentation. I checked previous thoughts on this and seems pretty complex.
A search is a GET method with arguments. Is it acceptable to use the below
syntax?
{
"@type": "hydra:SupportedProperty",
"hydra:property": {
"@id": "#Entrypoint/postalAddress",
"@type": "hydra:Link",
"domain": "#Entrypoint",
"rdfs:label": "The collection of PostalAddress resources",
"range": "hydra:PagedCollection",
"hydra:supportedOperation": [
{
"@type": "hydra:Operation",
"hydra:method": "GET",
"hydra:title": "Retrieves the collection of PostalAddress
resources.",
"rdfs:label": "Retrieves the collection of PostalAddress
resources.",
"returns": "hydra:PagedCollection"
},
{
"@type": "hydra:Operation",
* "expects": {"@type": "hydra:IriTemplate" ...}
"hydra:method": "GET",
"hydra:title": "Retrieves the collection of PostalAddress
resources.",
"rdfs:label": "Retrieves the collection of PostalAddress
resources.",
"returns": "hydra:PagedCollection"
},
{
"@type": "hydra:CreateResourceOperation",
"expects": "http://schema.org/PostalAddress",
"hydra:method": "POST",
"hydra:title": "Creates a PostalAddress resource.",
"rdfs:label": "Creates a PostalAddress resource.",
"returns": "http://schema.org/PostalAddress"
}
]
},
* "expects": {
"@type": "hydra:IriTemplate",
"hydra:template":
"/postal_addresses{?id,id[],addressLocality,addressLocality[]}",
"hydra:variableRepresentation": "BasicRepresentation",
"hydra:mapping": [
{
"@type": "IriTemplateMapping",
"variable": "id",
"property": "id",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "id[]",
"property": "id",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "addressLocality",
"property": "addressLocality",
"required": false
},
{
"@type": "IriTemplateMapping",
"variable": "addressLocality[]",
"property": "addressLocality",
"required": false
}
]
},
Thanks,
Dimitris
Received on Saturday, 8 April 2017 11:45:32 UTC