How to define/interpret if a field of an action corresponds to a path-variable, request-parameter or request-body-field?

46 views
Skip to first unread message

Ingo Griebsch

unread,
Nov 12, 2019, 4:03:42 PM11/12/19
to Siren Hypermedia
Hi all, I would like to understand if/how I could define and interpret if for example a POST dictates a request-body AND some request-parameters. 

If I understand it correct, a POST should be defined as an action. And I can define fields for that action. 
But it looks like I cannot define if an action-field corresponds to a path-variable, request-parameter or request-body-field.

 

One way I could define it is that I keep the placeholders in the href of the action ( like '/something{?key}'). 

This way I could interpret, that action-field 'key' is a request-parameter (and not a request-body-field).

 

But in this gist https://gist.github.com/kevinswiber/3066768 it looks like the templated part was removed from the href and added as a field to the action the moment the HAL example is transformed to the Siren example. 

Therefore I would like to understand if my idea would break the Siren spec or if it is the 'correct' way to go.

 

Many thanks in advance for every help! 😊


Reply all
Reply to author
Forward
0 new messages