Skip to content

Add JSON Schema for VA Form 10-7959E#5

Draft
voidspooks wants to merge 1 commit into
masterfrom
optimus/10-7959e-schema-20260427T174658Z-c336
Draft

Add JSON Schema for VA Form 10-7959E#5
voidspooks wants to merge 1 commit into
masterfrom
optimus/10-7959e-schema-20260427T174658Z-c336

Conversation

@voidspooks

Copy link
Copy Markdown
Owner

⚠️ AI-Generated PR — This pull request was automatically generated by Optimus. All code requires human review and testing before merging.

New schema — VA Form 10-7959E

Summary

This PR introduces the JSON schema for VA Form 10-7959E (CHAMPVA Other Health Insurance Certification). The schema is defined under src/schemas/10-7959E/schema.js and covers veteran/beneficiary identification and insurance certification fields.

Key details of the schema include:

  • Reusable definitions for common field types: ssn (formatted as 999-99-9999), date (ISO 8601 YYYY-MM-DD), usPhone (formatted as (999) 999-9999), and zipCode (5-digit or ZIP+4 format)
  • Pattern-based validation is applied to all formatted string fields to enforce structural correctness at the schema level
  • additionalProperties: false is set at the root object level, preventing undeclared fields from being submitted
  • $ref-based definition references are used throughout via a buildDefinitionReference helper to promote reuse and reduce duplication
  • The schema targets draft-04 of the JSON Schema specification, consistent with the existing vets-json-schema patterns

Files

  • src/schemas/10-7959E/schema.js

Notes for reviewer

  • Please ensure you have incremented the version in package.json
  • Please add backend-review-group as a reviewer
  • The ssn, date, usPhone, and zipCode definitions follow existing conventions in the repository — please verify they align with or can be replaced by shared definitions if those exist in the codebase
  • Confirm that additionalProperties: false at the root is appropriate for this form's backend processing requirements
  • The full schema beyond the first 1000 characters should be reviewed carefully to ensure all required fields, conditional validations, and enumerated values (e.g., for insurance type or certification status fields) are correct and complete
  • ZIP code pattern supports both 5-digit (12345) and ZIP+4 (12345-6789) formats — confirm this is acceptable for this form's use case

Pull Requests to update the schema in related repositories

  • vets-api: pending
  • vets-website: pending

Generated by Optimus (https://github.com/aquia-inc/optimus).
All files require human review before merging.

Files:
- src/schemas/10-7959E/schema.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant