An action is a call to a OC Server just to get additional data. This comes from the need that some OCs need to call themselves again to get more data, and right now, every time you call, you need to pass all the initial parameters, even though they might not be needed (if we think them as routes, each route might have different needs in terms of input).
So this PR creates a new property action to the component. data on the POST endpoint (the one used by oc.getData on the browser), that when used, it will:
Disable parameter validation (so the server can handle it itself).
Pass a new parameter to the context called action, so the server can act upon, and decide the course given that action.
Ideally the templates can abstract this so the server side can already wrap this logic in a seamless way for the user (the logic of an action-aware server), but this is the minimal work in core so that can happen.
This adds minimal support for Actions.
What's an action?
An action is a call to a OC Server just to get additional data. This comes from the need that some OCs need to call themselves again to get more data, and right now, every time you call, you need to pass all the initial parameters, even though they might not be needed (if we think them as routes, each route might have different needs in terms of input).
So this PR creates a new property
action
to the component. data on the POST endpoint (the one used by oc.getData on the browser), that when used, it will:action
, so the server can act upon, and decide the course given that action.Ideally the templates can abstract this so the server side can already wrap this logic in a seamless way for the user (the logic of an action-aware server), but this is the minimal work in core so that can happen.