W3C home > Mailing lists > Public > public-hydra@w3.org > June 2014

Re: Do supported operations of a class always expect instances of the class?

From: Tomasz Pluskiewicz <tomasz@t-code.pl>
Date: Tue, 17 Jun 2014 10:32:50 +0200
Message-ID: <CAAFOhSfp_ud2kE+bnJV_JXEAADSE49gtX5O-qEh6S_ywbZxpzw@mail.gmail.com>
To: Jindřich Mynarz <mynarzjindrich@gmail.com>
Cc: public-hydra@w3.org
Hi Jindřich

On Tue, Jun 17, 2014 at 9:49 AM, Jindřich Mynarz
<mynarzjindrich@gmail.com> wrote:
> Hi,
>
> if a hydra:Class supports a hydra:Operation, does it mean that the
> operation hydra:expects an instance of the class? Has the description
> of supported operation always the following shape?
>
> :Class hydra:supportedOperation [ hydra:expects :Class ] .
>

I think that would be unnecessary and too rigid. Consider an example
of collections, to which you can post new members

:Collection hydra:supportedOperation [ hydra:method "POST" ;
hydra:expects :CollectionElement ] .

That's just off the top of my head but very common.

>
> And analogously for class instances:
>
> :instance hydra:operation [ hydra:expects :instance ] .
>

With instances the first thing I can think of is a more RPC style API,
where you post commands (think CQRS)

:instance a :User ; hydra:operation [ hydra:method "POST" ;
hydra:expects :ChangePasswordCommand ] .

Regards,
Tom

>
> - Jindřich
>
> --
> Jindřich Mynarz
> http://mynarz.net/#jindrich
>
>
Received on Tuesday, 17 June 2014 08:34:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:53:59 UTC