-
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 JSON Schema definition of the submitted data to the JSON registration backend plugin #4980
Labels
enhancement
owner: venlo
topic: registration
waiting for approval
An estimate was made but the stakeholder still needs to approve it.
Milestone
Comments
12 tasks
viktorvanwijk
added
enhancement
topic: registration
waiting for approval
An estimate was made but the stakeholder still needs to approve it.
owner: venlo
labels
Jan 2, 2025
viktorvanwijk
changed the title
Optionally, a JSON Schema definition of the submitted data is provided in the
Add JSON Schema definition of the submitted data to the JSON registration backend
Jan 2, 2025
schema
key
viktorvanwijk
changed the title
Add JSON Schema definition of the submitted data to the JSON registration backend
Add JSON Schema definition of the submitted data to the JSON registration backend plugin
Jan 2, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 2, 2025
…lugin Just as an example of what will be implemented in #4980
viktorvanwijk
added a commit
that referenced
this issue
Jan 8, 2025
The schema for the registration variables are left out for now, as they can't be selected in the JSON dump plugin options
viktorvanwijk
added a commit
that referenced
this issue
Jan 8, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 8, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 8, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 8, 2025
…f variables to include Also updated the JSON dump plugin
viktorvanwijk
added a commit
that referenced
this issue
Jan 8, 2025
- Add test for JSON schemas of formio components - Add test for form to JSON schema
viktorvanwijk
added a commit
that referenced
this issue
Jan 9, 2025
The schema for the registration variables are left out for now, as they can't be selected in the JSON dump plugin options
viktorvanwijk
added a commit
that referenced
this issue
Jan 9, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 9, 2025
…f variables to include Also updated the JSON dump plugin
viktorvanwijk
added a commit
that referenced
this issue
Jan 9, 2025
- Add test for JSON schemas of formio components - Add test for form to JSON schema
viktorvanwijk
added a commit
that referenced
this issue
Jan 9, 2025
…f variables to include Also updated the JSON dump plugin
viktorvanwijk
added a commit
that referenced
this issue
Jan 9, 2025
- Add test for JSON schemas of formio components - Add test for form to JSON schema
10 tasks
viktorvanwijk
added a commit
that referenced
this issue
Jan 9, 2025
There was a bug with the previous attachment processing, where attachments would get overwritten if multiple were uploaded
viktorvanwijk
added a commit
that referenced
this issue
Jan 10, 2025
The schema for the registration variables are left out for now, as they can't be selected in the JSON dump plugin options
viktorvanwijk
added a commit
that referenced
this issue
Jan 10, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 10, 2025
…f variables to include Also updated the JSON dump plugin
viktorvanwijk
added a commit
that referenced
this issue
Jan 10, 2025
- Add test for JSON schemas of formio components - Add test for form to JSON schema
viktorvanwijk
added a commit
that referenced
this issue
Jan 10, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 10, 2025
Also add support for user-defined variables
viktorvanwijk
added a commit
that referenced
this issue
Jan 13, 2025
…a source When a select component has a form variable as data source, the 'enum' property in the JSON schema is currently unfilled, because the 'values' option of the component is an empty list. Solution is to fetch the corresponding form variable and update the 'enum' property in the schema accordingly
viktorvanwijk
added a commit
that referenced
this issue
Jan 13, 2025
… a data source When a select box component has a form variable as data source, the 'properties' and 'required' properties in the JSON schema are currently unfilled, because the 'values' option of the component is an empty list. Solution is to fetch the corresponding form variable and update the 'properties' and 'required' property in the schema accordingly
viktorvanwijk
added a commit
that referenced
this issue
Jan 13, 2025
Clarifies which properties can be expected
viktorvanwijk
added a commit
that referenced
this issue
Jan 13, 2025
…led field If a field is not required, but sent anyway, it's value is an empty string
viktorvanwijk
added a commit
that referenced
this issue
Jan 13, 2025
…t if no value was submitted If the component is not required, the value is an empty dict, which means there are no required properties
viktorvanwijk
added a commit
that referenced
this issue
Jan 13, 2025
…JSON schema when the data source is not another form variable If the data source is a form variable, the list of options is not available here, so it doesn't make sense to include the enum/properties in the JSON schema
viktorvanwijk
added a commit
that referenced
this issue
Jan 14, 2025
There was a bug with the previous attachment processing, where attachments would get overwritten if multiple were uploaded. Now, they are added to a dictionary with their original name as a key
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
…lugin Just as an example of what will be implemented in #4980
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
There was a bug with the previous attachment processing, where attachments would get overwritten if multiple were uploaded
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
The schema for the registration variables are left out for now, as they can't be selected in the JSON dump plugin options
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
…f variables to include Also updated the JSON dump plugin
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
- Add test for JSON schemas of formio components - Add test for form to JSON schema
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
Also add support for user-defined variables
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
…a source When a select component has a form variable as data source, the 'enum' property in the JSON schema is currently unfilled, because the 'values' option of the component is an empty list. Solution is to fetch the corresponding form variable and update the 'enum' property in the schema accordingly
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
… a data source When a select box component has a form variable as data source, the 'properties' and 'required' properties in the JSON schema are currently unfilled, because the 'values' option of the component is an empty list. Solution is to fetch the corresponding form variable and update the 'properties' and 'required' property in the schema accordingly
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
Clarifies which properties can be expected
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
…led field If a field is not required, but sent anyway, it's value is an empty string
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
…t if no value was submitted If the component is not required, the value is an empty dict, which means there are no required properties
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
…JSON schema when the data source is not another form variable If the data source is a form variable, the list of options is not available here, so it doesn't make sense to include the enum/properties in the JSON schema
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
…when the data source is another form variable This data is not available in the component.as_json_schema methods based on the form alone, because all user defined variables and calculated values are saved in the DB at the moment of submission. So just the form is not enough to get this data, and we need to do some post-processing in the plugin where we have the submission available
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
viktorvanwijk
added a commit
that referenced
this issue
Jan 15, 2025
These things are tested in test_component_json_schemas.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
owner: venlo
topic: registration
waiting for approval
An estimate was made but the stakeholder still needs to approve it.
Sub task of #4908
Example
An example form with the following configuration:
firstName
andlastName
attachment
Should lead to a JSON object being sent with the shape:
The text was updated successfully, but these errors were encountered: