alps-io/spec

How to differentiate between resource parameters and returned semantic items

Opened this issue · 1 comments

In the intro sample of the spec, the descriptor type semantic is used for both describing that the resource takes a parameter of that descriptor (e.g. nameSearch) as well as to list semantic fields of the representation returned (e.g. all nested descriptors within contact).

How can a client differentiate between the two without having a link to the resource at hand (which it could inspect for parameters)?

@olivergierke

IIUYC (and I may not, but here goes...), this is about how a client can use the ALPS document to predict whether (in this case) nameSearch will appear in an HTML response as

  <input name="s" class="nameSearch" />

or

  <span class="nameSearch">Search Results for "Mike"</span>

it turns out, ALPS doesn't have a rule for telling you that. However, you can define an ALPS document to be more explicit if that's what you prefer (from an author POV).

from a consumer POV, client app builders area lead into preparing for both possibilities in a response. This can happen any number of ways, depending on the language used in the client (we can get into that if I'm actually talking about the same thing you are[g]).

lookig at this another way, what would help you sort this out from your POV? feel free to include an example here.