department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
284 stars 206 forks source link

Align vets-api/vets-website JSON to the GCLAWS POST Form21as JSON schema (part 1) #87164

Open a6marinos opened 5 months ago

a6marinos commented 5 months ago

Let's update the JSON object on vets-website, and consider adding validation in vets-api before sending the POST to the Form21as GCLAWS endpoint. For the latest version of the schema, check the https://ogccotst1.dva.va.gov:4501/swagger/index.html (requires CAG) POST Form21as Swagger docs!

Reference this PR as a starting point: https://github.com/department-of-veterans-affairs/vets-website/pull/32145

AC

a6marinos commented 3 months ago

As of 8/5/2024 sync with GCLaws team: Gary is working on getting updated minimal schema and parameter documentation provided by EoD 8/6.

jenniferbertsch commented 3 months ago

From Gary Mathis: Jennifer, Below is the test sample for Form21a. Can you send this to Tanner and whomever else needs it?

{ "firstName": "Thomas", "middleName": "Andrew", "lastName": "Thumb", "suffix": "Jr.", "homePhone": "5558675309", "homePhoneTypeId": 3, "canReceiveTexts": true, "homeEmail": "tom.thumb@tinyhouses.com", "birthDate": "2024-07-12", "birthAddressLine1": "12 Little Lane", "birthAddressLine2": "Building 2", "birthAddressLine3": "Houston", "birthCity": "Houston", "birthState": "TX", "birthCountry": "USA", "homeAddressLine1": "123 Little Street", "homeAddressLine1ine2": "Building 3", "homeAddressLine1ine3": "Apt 432", "homeAddressCity": "Dallas", "homeAddressState": "TX", "homeAddressPostalCode": "12345", "homeAddressCountry": "USA", "homeAddressIsMilitary": false, "businessName": "Tom Thumb's Fables and More", "businessAddressLine1": "555 PeeWee Street", "businessAddressLine2": "Building 630", "businessAddressLine3": "Unit 4", "businessAddressCity": "Houston", "businessAddressState": "TX", "businessAddressPostalCode": "12343", "businessAddressCountry": "USA", "businessAddressIsMilitary": false, "otherAddressLine1": "555 PeeWee Street", "otherAddressLine2": "Building 630", "otherAddressLine3": "Unit 4", "otherAddressCity": "Houston", "otherAddressState": "TX", "otherAddressPostalCode": "12343", "otherAddressCountry": "USA", "otherAddressIsMilitary": false, "primaryMailingAddress": "home", "applicationStatusId": 1, "accreditationTypeId": 2, "genderId": 2, "instructionAcknowledge": true, "employmentStatusId": 1, "employmentStatusExplaination": null, "employment": [ { "name": "Daily Bugle", "addressLine1": "123 4th street", "addressLine2": "Building 405", "addressLine3": "Suite 7", "addressCity": "New York", "addressState": "NY", "addressPostalCode": "12345", "addressCountry": "USA", "phoneNumber": "5552121234", "phoneExtension": "2335", "phoneTypeId": 7, "positionTitle": "Comic Relief", "startDate": "2024-07-11", "endDate": "2024-07-11", "supervisorName": "Peter Parker", "supervisorEmail": "spiderman@gmail.com" } ], "education": [ { "name": "Test University Name", "addressLine1": "123 4th street", "addressLine2": "Building 405", "addressLine3": "Suite 7", "addressCity": "Boston", "addressState": "MA", "addressPostalCode": "12345", "addressCountry": "USA", "institutionTypeId": 3, "startDate": "2024-07-03", "endDate": "2024-07-03", "wasDegreeReceived": true, "degreeTypeId": 4, "major": "Biology" } ], "servedInMilitary": true, "militaryServices": [ { "serviceBranchId": 4, "entryDate": "2000-07-11", "dischargeDate": "2013-09-03", "dischargeTypeId": 2, "dischargeTypeExplanation": "I was kicked out for going AWOL. I did not know that leaving the base for a week was AWOL.", } ], "characterReferences": [ { "firstName": "Tom", "middleName": "Eugene", "lastName": "Horner", "suffix": "Jr.", "addressLine1": "123 4th street", "addressLine2": "Building 405", "addressLine3": "Suite 7", "addressCity": "Boston", "addressState": "MA", "addressPostalCode": "12345", "addressCountry": "USA", "addressIsMilitary": false, "phoneNumber": "5552221344", "phoneExtension": "", "phoneTypeId": 2, "email": "thomer@gmail.com", "relationshipToApplicantTypeId": 4 } ], "advertisingtoVeterans": false, "consultingService": false, "financialPlanning": false, "funeralIndustry": false, "homeNursingCare": false, "medicalServices": false, "isInGoodStanding": false, "jurisdictions": [ { "name": "Test Jurisdiction Admittance", "admittanceTypeId": 1, "admissionDate": "2024-07-02", "membershipRegistrationNumber": "BR549", } ], "jurisdictionUploadedAllDocuments": false, "jurisdictionDeclinedToUploadDocuments": false, "jurisdictionExplan": "Bla Bla Bla", "admittedToPracticeAgency": false, "agencies": [ { "admittanceTypeId": 2, "admittanceType": null, "admissionDate": "2024-07-02", "membershipRegistrationNumber": "BR549A", }, { "name": "Test2 Agency Admittance", "admittanceTypeId": 2, "admittanceType": null, "admissionDate": "2024-07-02", "membershipRegistrationNumber": "BR549B", } ], "agenciesUploadedAllDocuments": true, "agenciesDeclinedToUploadDocuments": false, "agenciesExplan": "Bla Bla Bla", "wasImprisoned": false, "imprisonedExplanation": "Bla Bla Bla", "imprisonedUploadedAllDocuments": true, "imprisonedDeclinedToUploadDocuments": false, "wasMilitaryConviction": false, "militaryConvictionExplanation": "Bla Bla Bla", "militaryConvictionUploadedAllDocuments": true, "militaryConvictionDeclinedToUploadDocuments": false, "isCurrentlyCharged": false, "currentlyChargedExplanation": "Bla Bla Bla", "currentlyChargedUploadedAllDocuments": true, "currentlyChargedDeclinedToUploadDocuments": false, "wasSuspended": false, "suspendedExplanation": "Bla Bla Bla", "suspendedUploadedAllDocuments": true, "suspendedDeclinedToUploadDocuments": false, "hasWithdrawn": false, "withdrawnExplanation": "Bla Bla Bla", "withdrawnUploadedAllDocuments": true, "withdrawnDeclinedToUploadDocuments": false, "wasDisciplined": false, "disciplinedExplanation": "Bla Bla Bla", "disciplinedUploadedAllDocuments": false, "disciplinedDeclinedToUploadDocuments": false, "hasResignedRetired": false, "resignedRetiredExplanation": "Bla Bla Bla", "resignedRetiredUploadedAllDocuments": true, "resignedRetiredDeclinedToUploadDocuments": false, "wasAgentAttorney": false, "agentAttorneyExplanation": "Bla Bla Bla", "agentAttorneyUploadedAllDocuments": true, "agentAttorneyDeclinedToUploadDocuments": false, "wasReprimanded": false, "reprimandedExplanation": "Bla Bla Bla", "reprimandedUploadedAllDocuments": true, "reprimandedDeclinedToUploadDocuments": false, "hasResignedToAvoidReprimand": false, "resignedToAvoidReprimandExplanation": "Bla Bla Bla", "resignedToAvoidReprimandUploadedAllDocuments": true, "resignedToAvoidReprimandDeclinedToUploadDocuments": false, "hasAppliedForAccreditation": false, "appliedForAccreditationExplanation": "Bla Bla Bla", "appliedForAccreditationUploadedAllDocuments": true, "appliedForAccreditationDeclinedToUploadDocuments": false, "wasAccreditationTerminated": false, "accreditationTerminatedExplanation": "Bla Bla Bla", "accreditationTerminatedUploadedAllDocuments": true, "accreditationTerminatedDeclinedToUploadDocuments": false, "hasImpairments": false, "impairmentsExplanation": "Bla Bla Bla", "impairmentsUploadedAllDocuments": true, "impairmentsDeclinedToUploadDocuments": false, "hasPhysicalLimitations": false, "physicalLimitationsExplanation": "Bla Bla Bla", "physicalLimitationsUploadedAllDocuments": true, "physicalLimitationsDeclinedToUploadDocuments": false, "supplementalStatement": "Bla Bla Bla", "personalStatement": "Bla Bla Bla", "signature": "Signature string" }

tjheffner commented 3 months ago

FormTypeId: 1 = Form21, 2 = Form21a

AccreditationTypeId: 1 = Agent, 2 = Attorney, 3 = VSO Representative, 4 = Authorized Individual, 5 = VSO

ApplicationStatusId: 1 = Pending, 2 = Request/Return for information, 3 = VA Reference Check, 4 = Character References, 5 = Background Check, 6 = Paralegal Research, 7 = Attornet C&F, 8 = DCC Review, 9 = Complete-Denial Letter, 10 = Complete-Accredited, 11 = Complete-Withdraw/Abandoned/Other, 12 = Exam Invitation, 13 = Exam Scheduled, 14 = Exam Failed

Gender: 1 = unknown, 2 = male, 3 = female

AddressTypeId: 1 = home, 2 = business, 3 = employment, 4 = institution, 5 = characterReference

EmploymentStatusId: 1 = Employed, 2 = Unemployed, 3 = Self-employed, 4 = Student

serviceBranchId: 1 = Air Force, 2 = Army, 3 = Coast Guard, 4 = Marines, 5 = Navy, 6 = NOAA, 7 = No Active Service, 8 = Public Health Service, 9 = Space Force, 10 = Other

DischargeTypeId: 1 = Bad Conduct, 2 = Dishonorable, 3 = Convenience of Govt, 4 = Entry Level, 5 = General, 6 = Honorable, 7 = Medical, 8 = Other Than Honorable

phoneTypeId: 1 = Fax, 2 = Home, 3 = Mobile, 4 = Other, 5 = Pager, 6 = TTY/TDD(711), 7 = Work

institutionTypeId: 1 = High School, 2 = Community College, 3 = Under Graduate, 4 = Graduate

DegreeTypeId: 1 = GED, 2 = HS Diploma, 3 = Associates, 4 = Bachelors, 5 = Masters, 6 = Doctorate

AdmittanceTypeId: = 1 = Jurisdiction, 2 = Agency

DocumentTypeId: 1 = Jurisdiction, 2 = Agency, 3 = Imprisoned, 4 = Convicted, 5 = CurrentlyCharged, 6 = Suspended, 7 = Withdrawn, 8 = Disciplined, 9 = ResignedRetired, 10 = AgencyAttorney, 11 = Reprimanded, 12 = ResignedToAvoidReprimand, 13 = AppliedForAccreditation, 14 = AccreditationTerminated, 15 = Impairments, 16 = PhysicalLimitations,

RelationToApplicantId: 1 = Classmate, 2 = Colleague, 3 = Customer/Client, 4 = Friend, 5 = Neighbor, 6 = Supervisor, 7 = Educator, 8 = Other

hdbaines commented 2 months ago

Once PR is reviewed we will close the ticket, and create follow up ticket to update our end once alignment has been reached between GCLAWS and new ARFv2

PR - https://github.com/department-of-veterans-affairs/vets-website/pull/31680/files

hdbaines commented 2 months ago

@gabezurita to add basic vets-api parameter validation

gabezurita commented 2 months ago
  • [x] vets-api has schema validation (this may be redundant, so let's chat about this)

This AC bullet became follow-on work here.

nihil2501 commented 2 months ago

Needs a second pass. No verified test suite yet. Also found erroneous code. Reverted with ability to recover deleted code from git history.

candilemoine commented 4 weeks ago

Based on Slack conversation, here's the update for OJ:

Validate that the submitted form has the correct schema server side, again leveraging the vets-json-schema project's schema here

nihil2501 commented 4 weeks ago

@jquispe-oddball Updated guidance on what to focus on: Transform 21a form data client side (before submitting it to the server)