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

API-42025-update-v2-poa-schema-to-allow-empty-string-email #19438

Conversation

rockwellwindsor-va
Copy link
Contributor

Summary

  • Updates REGEX pattern in V2 2122.json and 2122a.json so that an empty string can also pass the validation
  • Adds tests for validating the REGEX expectations

Related issue(s)

API-42025

Testing done

  • New code is covered by unit tests

Screenshots

Note: Optional

What areas of the site does it impact?

modified:   modules/claims_api/config/schemas/v2/2122.json
modified:   modules/claims_api/config/schemas/v2/2122a.json
modified:   modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122_spec.rb

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

Please try to break this REGEX with anything you can think to send in. I am always hesitant to do REGEX changes. This appeared to validate expected email formats like va.gov@email.com, email@email.com etc. While I do feel it is dialed in always skeptical and leery of my REGEX changes.

* Updates REGEX pattern in V2 2122.json and 2122a.json so that an empty string can also pass the validation
	modified:   modules/claims_api/config/schemas/v2/2122.json
	modified:   modules/claims_api/config/schemas/v2/2122a.json
	modified:   modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122_spec.rb
@rockwellwindsor-va rockwellwindsor-va added the claimsApi modules/claims_api label Nov 13, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to API-42025-update-v2-poa-schema-to-allow-empty-string-email/main/main November 13, 2024 15:52 Inactive
@rockwellwindsor-va rockwellwindsor-va marked this pull request as ready for review November 13, 2024 16:32
@rockwellwindsor-va rockwellwindsor-va requested a review from a team as a code owner November 13, 2024 16:32
Copy link
Contributor

@mchristiansonVA mchristiansonVA left a comment

Choose a reason for hiding this comment

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

Tested v2 2122 & 2122a with empty veteran/claimant/serviceOrganization emails and confirmed they're allowed by schema. Looks good to me!

Copy link
Contributor

@rmtolmach rmtolmach left a comment

Choose a reason for hiding this comment

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

sorry, looks like you were blocked from merging.

Copy link

Backend-review-group approval confirmed.

@rockwellwindsor-va rockwellwindsor-va merged commit 87b432d into master Nov 18, 2024
26 checks passed
@rockwellwindsor-va rockwellwindsor-va deleted the API-42025-update-v2-poa-schema-to-allow-empty-string-email branch November 18, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants