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 42951 poa v2 zip code updates #19665

Merged
merged 11 commits into from
Dec 4, 2024

Conversation

rockwellwindsor-va
Copy link
Contributor

@rockwellwindsor-va rockwellwindsor-va commented Dec 2, 2024

Summary

zipCode is only required now when the countryCode is 'US'

  • Updates schema
  • updates validations
    • Adjusts/add tests
  • Updates documentation to reflect changes for zipCode

Related issue(s)

API-42951

Testing done

  • New code is covered by unit tests
  • Old tests adjusted

Testing Notes

  • Any 2122 & 2122a v2 submissions where the countryCode and zipCode are taken out/put in will test the behavior
Screenshot 2024-12-04 at 7 40 03 AM

Screenshots

  • 2122
    Screenshot 2024-12-04 at 7 18 09 AM
    Screenshot 2024-12-04 at 7 19 11 AM

  • 2122a
    Screenshot 2024-12-04 at 7 15 06 AM
    Screenshot 2024-12-04 at 7 15 14 AM
    Screenshot 2024-12-04 at 7 16 19 AM

What areas of the site does it impact?

modified:   modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb
modified:   modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb
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
modified:   modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122a_spec.rb
modified:   modules/claims_api/spec/requests/v2/veterans/power_of_attorney/power_of_attorney_request_spec.rb
modified:   modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
modified:   modules/claims_api/app/swagger/claims_api/v2/production/swagger.json

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

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

* Updates schema
* updates validations
	* Adjusts/add tests
	modified:   modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb
	modified:   modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb
	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
	modified:   modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122a_spec.rb
	modified:   modules/claims_api/spec/requests/v2/veterans/power_of_attorney/power_of_attorney_request_spec.rb
Copy link

github-actions bot commented Dec 2, 2024

1 Warning
⚠️ This PR changes 232 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • modules/claims_api/app/controllers/claims_api/v2/veterans/power_of_attorney/base_controller.rb (+2/-1)

  • modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb (+19/-9)

  • modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122_spec.rb (+123/-0)

  • modules/claims_api/spec/requests/v2/veterans/power_of_attorney/2122a_spec.rb (+63/-13)

  • modules/claims_api/spec/requests/v2/veterans/power_of_attorney/power_of_attorney_request_spec.rb (+1/-1)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to API-42951-poa-v2-zip-code-updates/main/main December 2, 2024 13:51 Inactive
* Updates documentation to reflect changes for zipCode
	modified:   modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
	modified:   modules/claims_api/app/swagger/claims_api/v2/production/swagger.json
@va-vfs-bot va-vfs-bot temporarily deployed to API-42951-poa-v2-zip-code-updates/main/main December 2, 2024 14:11 Inactive
@rockwellwindsor-va rockwellwindsor-va added the claimsApi modules/claims_api label Dec 2, 2024
@rockwellwindsor-va rockwellwindsor-va marked this pull request as ready for review December 2, 2024 18:12
@rockwellwindsor-va rockwellwindsor-va requested a review from a team as a code owner December 2, 2024 18:12
@va-vfs-bot va-vfs-bot temporarily deployed to API-42951-poa-v2-zip-code-updates/main/main December 2, 2024 18:45 Inactive
stiehlrod
stiehlrod previously approved these changes Dec 3, 2024
Copy link
Contributor

@stiehlrod stiehlrod 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. LGTM

Copy link
Contributor

@tycol7 tycol7 left a comment

Choose a reason for hiding this comment

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

looking good so far. are we using country or countryCode? seems to be a mix of both throughout.

Copy link
Contributor

@tycol7 tycol7 left a comment

Choose a reason for hiding this comment

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

we should resolve country vs countryCode before merging.

@rockwellwindsor-va
Copy link
Contributor Author

rockwellwindsor-va commented Dec 3, 2024

looking good so far. are we using country or countryCode? seems to be a mix of both throughout.

Yep totally got some bleed over on that term from the other PR with that update in it. Should have just merged in order but now that https://github.com/department-of-veterans-affairs/vets-api/pull/19650[)](https://github.com/department-of-veterans-affairs/vets-api/commit/4c52087c513b9296c62326dd81f57b925e29eb78) has merged in can utilize countrycode throughout as needed.

Also address the other comments:

  • countryCode should now be consistently used
  • refactored address method to avoid duplication
  • adjusted method name to be more descriptive
  • linting fixes

Added new screenshots in PR

* Fixes misplaced `countryCode` usage
* Adjusts missing missing spaces in the docs
* Compiles docs w/ updates
* Refactors `validate_address_zip_code` with `validate_zip` method to remove code duplication
* A few other small linting fixes based on PR feedback
	modified:   modules/claims_api/app/controllers/concerns/claims_api/v2/power_of_attorney_validation.rb
	modified:   modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
	modified:   modules/claims_api/app/swagger/claims_api/v2/production/swagger.json
	modified:   modules/claims_api/config/schemas/v2/2122a.json
@rockwellwindsor-va rockwellwindsor-va marked this pull request as draft December 3, 2024 19:09
@va-vfs-bot va-vfs-bot temporarily deployed to API-42951-poa-v2-zip-code-updates/main/main December 3, 2024 19:24 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-42951-poa-v2-zip-code-updates/main/main December 3, 2024 20:17 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-42951-poa-v2-zip-code-updates/main/main December 4, 2024 00:26 Inactive
tycol7
tycol7 previously approved these changes Dec 4, 2024
Copy link
Contributor

@tycol7 tycol7 left a comment

Choose a reason for hiding this comment

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

looks great!

Comment on lines 44 to 45
# the Claimant object is already being validatated below,
# so that code has been adjusted and it is being left out of this workflow
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldnʼt need the comment now that the method name is self-descriptive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, yep cabc789

@rockwellwindsor-va rockwellwindsor-va merged commit 451e121 into master Dec 4, 2024
30 checks passed
@rockwellwindsor-va rockwellwindsor-va deleted the API-42951-poa-v2-zip-code-updates branch December 4, 2024 16:47
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