Skip to content

Commit

Permalink
Refactored 'associations' to 'veteranContacts' for less ambiguity (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshingYou1 authored Nov 29, 2023
1 parent 2092ad2 commit c2b24c2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/10-10EZR-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@
true
]
},
"associations": {
"veteranContacts": {
"type": "array",
"items": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion dist/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@
"step"
]
},
"associations": {
"hcaVeteranContacts": {
"type": "array",
"items": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vets-json-schema",
"version": "20.32.4",
"version": "20.33.4",
"repository": {
"type": "git",
"url": "git+https://github.com/department-of-veterans-affairs/vets-json-schema.git"
Expand Down
16 changes: 8 additions & 8 deletions src/common/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ const hcaDependents = {
},
};

const associationRelationships = {
const hcaVeteranContactRelationships = {
type: 'string',
enum: [
'BROTHER',
Expand All @@ -387,27 +387,27 @@ const associationRelationships = {
],
};

const associationTypes = {
const hcaVeteranContactTypes = {
type: 'string',
enum: ['Primary Next of Kin', 'Other Next of Kin', 'Emergency Contact', 'Other emergency contact'],
};

const association = {
const hcaVeteranContact = {
type: 'object',
properties: {
fullName: hcaFullName,
primaryPhone: hcaPhone,
alternatePhone: hcaPhone,
address: hcaAddress,
relationship: associationRelationships,
contactType: associationTypes,
relationship: hcaVeteranContactRelationships,
contactType: hcaVeteranContactTypes,
},
required: ['fullName', 'primaryPhone', 'address', 'relationship', 'contactType'],
};

const associations = {
const hcaVeteranContacts = {
type: 'array',
items: association,
items: hcaVeteranContact,
};

// Historically a veteran's service number has been between 5 and 8 digits,
Expand Down Expand Up @@ -942,7 +942,7 @@ export default {
netWorthAccount,
relationshipAndChildName,
relationshipAndChildType,
associations,
hcaVeteranContacts,
marriages,
files,
requiredServiceHistory,
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/10-10EZR/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const schema = {
type: 'boolean',
enum: [true],
},
associations: definitions.associations,
veteranContacts: definitions.hcaVeteranContacts,
},
required: [
'privacyAgreementAccepted',
Expand Down

0 comments on commit c2b24c2

Please sign in to comment.