You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2: [ART] POA requests: define POA form schema (#19994)
* (fix) Remove NOT NULL constraint from encrypted_kms_key in ar_power_of_attorney_requests_resolutions and ar_power_of_attorney_forms
* (fix) Update schema.rb to reflect removal of NOT NULL constraint from encrypted_kms_key
* (fix) Remove mock encrypted_kms_keys from power_of_attorney_form and power_of_attorney_request_resolution factories
* Add PowerOfAttorneyRequestSerializer and accompanying spec
- Implement PowerOfAttorneyRequestSerializer to handle resolution attributes:
- Includes `id`, `type`, `created_at`, `reason`, and conditional `creator_id`
- Ensure safe handling of nil values with safe navigation (`&.`) and `try`
- Add RSpec tests to validate:
- Resolution serialization for decisions, expirations, and declinations
- Handling of `reason` and `creator_id` conditionally
- Nil resolution scenarios
* Add serializer for PowerOfAttorneyRequest with controller and tests
- Implement `PowerOfAttorneyRequestSerializer` to standardize JSON:API output
- Add request specs for controller endpoints (`index` and `show`)
- Add serializer specs to ensure proper formatting of resolution details
- Normalize response keys for consistency in test expectations
* (feat): Add serializers for PowerOfAttorneyRequest and Resolution with specs
- Implement `PowerOfAttorneyRequestSerializer` to handle serialization of power of attorney requests, including nested resolution data.
- Implement `PowerOfAttorneyRequestResolutionSerializer` to serialize resolution details, accommodating various resolution subtypes.
- Add comprehensive specs for both serializers to ensure accurate and dynamic handling of attributes.
- Adjust model factories accordingly
* (fix) Refactor AR PowerOfAttorneyRequestController includes for improved query performance
- Updated `includes` to reference `resolving` instead of just `resolution`
- Added a limit of 100 records in the `index` action to optimize data retrieval
* [ART-98710] Spike ARP POA request list and show endpoints
* [ART-98710] Inline compound POA request response document
* [ART] POA requests: define POA form schema
* [ART] (fix) Minor rubocop issue: trailing whitespace
---------
Co-authored-by: OJ Bucao <[email protected]>
Co-authored-by: OJ Bucao <[email protected]>
Co-authored-by: Alex Prokop <[email protected]>
Copy file name to clipboardexpand all lines: modules/accredited_representative_portal/app/models/accredited_representative_portal/power_of_attorney_form.rb
+278
Original file line number
Diff line number
Diff line change
@@ -13,5 +13,283 @@ class PowerOfAttorneyForm < ApplicationRecord
13
13
blind_index:city
14
14
blind_index:state
15
15
blind_index:zipcode
16
+
17
+
##
18
+
# TODO: Can couple this to the schema involved in user input during POA
19
+
# request creation.
20
+
#
21
+
# Currently, it is a small-ish transformation of the most closely related
22
+
# schema in existence at the time of writing:
23
+
# [The schema for 2122 PDF generation](https://github.com/department-of-veterans-affairs/vets-api/blob/124adcfbeb4cba0d17f69e392d2af6189acd4809/modules/representation_management/app/swagger/v0/swagger.json#L749-L948)
24
+
#
25
+
# Of note:
26
+
# - Optional `dependent` property for the non-Veteran claimant (NVC) case
27
+
# - Does NVC necessarily mean a claimant that is a dependent of the Veteran?
28
+
# - If so, using the name `dependent` lets us use the word `claimant` more straightforwardly
29
+
# - `poa_request.claimant_type` is `{ veteran | dependent }`
30
+
# - All properties required but some nullable
31
+
# - Rather than representing optionality by omission from `required` properties
0 commit comments