department-of-veterans-affairs / va-forms-system-core

VA Forms System Core will be a React library hosted in NPM that will allow engineers and designers to easily interact with Forms inside of vets-website.
https://department-of-veterans-affairs.github.io/va-forms-system-core/
6 stars 4 forks source link

Remove keys which are not present in schema before submitting to vets-api #567

Closed harshil1793 closed 2 years ago

harshil1793 commented 2 years ago

Description

Recently vets schema for burial form was updated in production where veteranServedUnderAnotherName and benefitsSelection were removed.

The value of this two fields are only required for form validation and not when we submit the form to vets api. So we want to remove this fields before we submit to vets api.

Proposed Solution

Compare initial values with the values right before the form submission and remove the keys which are not present in initial values. (There are certain fields which are required and are not in the initial values so check if initial value is source of truth)

Acceptance Criteria

va-vsp-bot commented 2 years ago

:tada: This issue has been resolved in version 1.5.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: