-
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
Feature/4980 add json schema to submitted data of json dump plugin #5007
Draft
viktorvanwijk
wants to merge
69
commits into
master
Choose a base branch
from
feature/4980-add-json-schema-to-submitted-data-of-json-dump-plugin
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Feature/4980 add json schema to submitted data of json dump plugin #5007
viktorvanwijk
wants to merge
69
commits into
master
from
feature/4980-add-json-schema-to-submitted-data-of-json-dump-plugin
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
The content of the attachment is now added to the result
Now includes a check on the generated values dictionary for easy testing
This is a requirement of the plugin
The user might want to send it to just the api root of the service
Makes more sense to keep static variables dict close to where it's used
The previous size was not big enough to show all elements without scroll bars
Required for simulating a receiving service
It is sufficient to only pass the relative endpoint to the .post method
This check if redundant, as the for loop will never be executed anyway if the query set is empty
It is closely related to the serializer
…pes only Only ORC type services are relevant for this plugin
Clarifies which config
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
… story For clarity.
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.
…data It is neater to build up what needs to be processed first, before doing the processing
There was a bug with the previous attachment processing, where attachments would get overwritten if multiple were uploaded
The schema for the registration variables are left out for now, as they can't be selected in the JSON dump plugin options
…f variables to include Also updated the JSON dump plugin
- Add test for JSON schemas of formio components - Add test for form to JSON schema
Also add support for user-defined variables
Looks much better now
viktorvanwijk
force-pushed
the
feature/4980-add-json-schema-to-submitted-data-of-json-dump-plugin
branch
from
January 10, 2025 11:21
0740d05
to
7997531
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #4980
Changes
Added JSON schema definition to the submitted data of the JSON dump registration plugin
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Dockerfile/scripts
./bin
folderCommit hygiene