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

fix: update Applicant definition #62

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Oct 26, 2023

Emily spotted this one today while we were catching up about this work and how it relates to what editors define!

Removes data.applicant.contact & data.applicant.agent.contact and bumps keys like name, email, phone, company out to the main level consistent with Planx passport heirarchy. There wasn't any particularly good reason to wrap within contact in the first place.

Once merged and published, I'll update migration guides accordingly (it's unlikely anyone has started parsing yet).

@@ -43,7 +43,7 @@ describe("parsing using the 'ajv' library", () => {
examplesToTest.forEach(example => {
test(`accepts a valid example: ${example.data.application.type.description}`, () => {
// addFormats() is required for types UUID, email, datetime etc
const ajv = addFormats(new Ajv());
const ajv = addFormats(new Ajv({allowUnionTypes: true}));
Copy link
Member Author

@jessicamcinchak jessicamcinchak Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fixes some warnings that were being thrown when testing, ref https://ajv.js.org/strict-mode.html#union-types

@jessicamcinchak jessicamcinchak merged commit 6742ec8 into main Oct 27, 2023
@jessicamcinchak jessicamcinchak deleted the jess/edit-applicant branch October 27, 2023 07:12
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.

2 participants