Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Actions #1346

Merged
merged 5 commits into from
Dec 23, 2023
Merged

Conversation

ricardo-devis-agullo
Copy link
Collaborator

@ricardo-devis-agullo ricardo-devis-agullo commented Nov 14, 2023

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:

  • 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.

@ricardo-devis-agullo ricardo-devis-agullo merged commit 524adde into master Dec 23, 2023
3 of 4 checks passed
@ricardo-devis-agullo ricardo-devis-agullo deleted the add-action-route-support branch December 23, 2023 17:47
@ricardo-devis-agullo ricardo-devis-agullo restored the add-action-route-support branch December 23, 2023 17:47
@ricardo-devis-agullo ricardo-devis-agullo deleted the add-action-route-support branch January 2, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant