openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@adobe.com>
Subject Re: Allow actions to be accessible from a web browser
Date Mon, 16 Jan 2017 12:07:07 GMT
Hi Rodric

Am 13.01.2017 um 18:07 schrieb Rodric Rabbah <rodric@gmail.com<mailto:rodric@gmail.com>>:

you mean the property really indicates the Content-Type to represent the
resource as ? Have you considered using the an extension in the action such
as …/my-action.html ?

I had not. Do you mean an extension to describe both the content type and
the field to project? There are two parts to this from the demo (and what I
implemented):

1: projecting a field from the JSON object that is the result of the
action.
2: how to marshal the projected value

So I conflated both: the property name implies also a convention for the
marshaling. So using html reads response.html and turns it into the proper
format.

Yeah, that is problematic and limiting indeed. As the property to represent and the format
to represent it in are orthogonal issues and thus cannot possibly be conflated unless you
come up with a complex encoding.


Your suggestion I think makes it possible to disentangle the desired
content-type and the property name to project. It could also then make it
possible to do what Nick alluded to: rather than projecting one property,
the resource could be specified as a full path (of nested properties). As
in:

http://openwhisk.host/experimental/web/ns/p/action.html/a/b/c.

One issue with using "." as the separator is that it's also a legal
character for action names. So a different delimiter would be needed
otherwise the path parsing is ambiguous.

I like that. And incidnentally (or not, maybe, probably) this is exactly how we disect URL
paths in Apache Sling: See URL Decomposition [1]

This also solves the „action is allowed to contain a dot“ problem.

Regards
Felix

[1] http://sling.apache.org/documentation/the-sling-engine/url-decomposition.html
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message