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-38827-update-validations-intl-postal-code #18323

Merged
merged 7 commits into from
Sep 9, 2024

Conversation

stiehlrod
Copy link
Contributor

@stiehlrod stiehlrod commented Sep 5, 2024

Summary

  • Makes changes to the 526 v2 schema for internationalPostalCode,
  • Adjusts doc/swagger files.
  • Removes requirement validation for internationalPostalCode.

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Postman 526 v2
  • is internationalPostalCode required
  • maxLength should be 16
  • no dashes should be allowed
  • should allow alphanumeric

partial request bodies

change of address:

            "changeOfAddress": {
                "typeOfAddressChange": "TEMPORARY",
                "addressLine1": "10 Peach St",
                "addressLine2": "Unit 4",
                "addressLine3": "Room 1",
                "city": "Atlanta",
                "state": "GA",
                "country": "Afghanistan",
                "zipFirstFive": "42220",
                "zipLastFour": "9897",
                "dates": {
                    "beginDate": "2023-06-04",
                    "endDate": "2023-12-04"
                },
                    "internationalPostalCode": "643728dhjekfhjd"
            },

mailing address:

                "mailingAddress": {
                    "addressLine1": "1234 Couch Street",
                    "addressLine2": "Unit 4",
                    "addressLine3": "Room 1",
                    "city": "Portland",
                    "state": "OR",
                    "country": "Afghanistan",
                    "zipFirstFive": "41726",
                    "zipLastFour": "1234",
                    "internationalPostalCode": "643728dhjekfhjd"
                },

What areas of the site does it impact?

  • modules/claims_api/config/schemas/v2/526.json
  • modules/claims_api/app/swagger/claims_api/v2/production/swagger.json
  • modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
  • modules/claims_api/app/controllers/concerns/claims_api/v2/disability_compensation_validation.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

…ts doc/swagger files. Removes requirement validation for internationalPostalCode.
@stiehlrod stiehlrod added the claimsApi modules/claims_api label Sep 5, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to API-38827-update-validations-intl-postal-code/main/main September 5, 2024 14:35 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-38827-update-validations-intl-postal-code/main/main September 5, 2024 14:47 Inactive
@stiehlrod stiehlrod marked this pull request as ready for review September 5, 2024 15:01
@stiehlrod stiehlrod requested a review from a team as a code owner September 5, 2024 15:01
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.

Testing locally with Postman, looks like we're still allowing non-alphanumeric characters in the internationPostalCode field. Setting country to non-USA and adding the following to mailingAddress or changeOfAddress, the /validate endpoint indicates it's valid:
"internationalPostalCode": "1234-56798"

Submitting thie same data via the /synchronous endpoint results in a docker container error.

@va-vfs-bot va-vfs-bot temporarily deployed to API-38827-update-validations-intl-postal-code/main/main September 5, 2024 17:36 Inactive
@stiehlrod stiehlrod marked this pull request as draft September 5, 2024 19:07
@stiehlrod stiehlrod requested a review from a team September 5, 2024 19:48
@stiehlrod stiehlrod marked this pull request as ready for review September 5, 2024 19:48
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.

Retested in Postman and validations are working as expected for non-alphanumeric characters; confirmed documentation updates are as expected as well. Looks good to me!

@stiehlrod stiehlrod merged commit 430a1e3 into master Sep 9, 2024
22 checks passed
@stiehlrod stiehlrod deleted the API-38827-update-validations-intl-postal-code branch September 9, 2024 14:18
gabezurita added a commit that referenced this pull request Sep 9, 2024
* master:
  case9 logic fixed (#18362)
  API-39748-add-index-to-error-collection-messages (#18333)
  Use random value in Simple Forms PDF stamping file paths (#18361)
  Add `find_dependents_by_ptcpnt_id` to local bgs (#18303)
  remove request_ping defs (#18353)
  API-38827-update-validations-intl-postal-code (#18323)
  [Document Upload Failure] Email veteran on Form 0781/Form 0781a upload retry exhaustion (#18206)
  add feature flags for meb and 5490 (#18328)
  Handle 500 responses from VA Profile v3 Service for v0/profile/contacts endpoint (#18192)
  Resolve MethodLength Rubocop Disables - Part 3 (#18331)
  Resolve MethodLength Rubocop Disables - Part BGS::Form674 (#18326)
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.

3 participants