-
Notifications
You must be signed in to change notification settings - Fork 26
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 a registration backend that sends the form/submission variables as JSON to some API endpoint #4908
Comments
Plugin name did not make sense before
API endpoint is relative, name should reflect that
Will be easier to add new fields
Does 'optionally' mean that the configuration options should also include a checkbox (for example) with which you can select this? |
No - it's a wish to include this, but having the actual data is the minimum requirement for this ticket. Including the JSON Schema is desired, but not crucial and should likely be the final task of this ticket to implement :) |
Plugin name did not make sense before
API endpoint is relative, name should reflect that
Will be easier to add new fields
It should match the corresponding property of the serializer (which is 'service' and not 'service_select')
Not relevant anymore or duplicates
Wrong place and doesn't look great
…n plugin Need to include all form variables listed in the options to a values dictionary
This will raise a KeyError if a form variable is not available in the submitted data nor in the static variables. This is better than passing is silently
…e service The instructions on how to start it is now in line with the other docker compose services
The configuration options could be saved without specifying any form variables to include. This does not make much sense. Added a minimum length of 1 for the form variables list in the serializer (Thanks to Robin for the hint)
Will check the connection to the configured service
…n editor The field 'formVariables' is read-only, so need an extra const to modify its value. Note, this didn't show up in storybook testing, only in manual functional testing
…lugin Just as an example of what will be implemented in #4980
* Use VCR instead of mock now * Added check on the response * Added check on attachment encoding
* Use VCR instead of mock now * Add test for invalid response from API endpoint
PR feedback: global config checks are not really useful for this plugin right now.
A bit more descriptive and avoids possible naming conflicts
formData will be an empty object if we add a new object, which means the default values for the configuration fields are missing
* Add required and noManageChildProps to ServiceSelect and FormVariableSelect because they are required and need to prevent some Field props being passed down to the children * Remove max length of FormioVariableKeyField: it is based on a text field which has no length constraints * Remove id field from RelativeAPIEndpoint TextInput: is managed automatically * Remove Required from JSONDumpOptions: required is the default for TypedDict * Add default value for relative_api_endpoint: guarantees that the key is always present, which gives a strict type definition * Remove content type headers: is set automatically when using the json kwargs * Replace 'Included/Not Included' text with icons: makes it easier for the user to see whether it is included.
The requests.Response object is not JSON serializable, so need to just add the json of it.
There is a desire for a "simple" registration backend/plugin which just dumps the submission/form variables with their values as a "flat" JSON structure and sends this data to an API endpoint for further processing. The goal is to keep this super simple and light weight, and let the post-processing be done on the receiving end (with an enterprise service bus or other technologies).
Requirements
values
and (optional?)schema
is sentzgw_consumers.Service
)Example
An example form with the following configuration:
firstName
andlastName
attachment
Should lead to a JSON object being sent with the shape:
Tasks
if settings.DEBUG
since I don't expect this to be done for 3.0Pointers
Existing code that can be useful:
The text was updated successfully, but these errors were encountered: