Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Add JSON Schema for VA Form 10-0137#1176

Draft
tarratsco wants to merge 1 commit into
masterfrom
optimus/10-0137-schema-20260423T185355Z-8247
Draft

Add JSON Schema for VA Form 10-0137#1176
tarratsco wants to merge 1 commit into
masterfrom
optimus/10-0137-schema-20260423T185355Z-8247

Conversation

@tarratsco
Copy link
Copy Markdown
Contributor

⚠️ 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-0137

Summary

This PR introduces a new JSON Schema for VA Form 10-0137 (VA Advance Directive / Living Will and Durable Power of Attorney for Health Care). The schema is defined under src/schemas/10-0137/schema.js and covers the core data structures required for the form.

Key schema characteristics include:

  • fullName definition: Captures first, middle, and last name fields with string length constraints (minLength/maxLength) and a pattern restricting input to alphabetic characters, hyphens, apostrophes, and spaces. first and last are required; middle is optional and nullable (type: ['string', 'null']).
  • address definition: Structured address object with street and city fields (additional fields likely follow in the full schema). Fields enforce minimum and maximum length constraints.
  • Reusable definitions: A buildDefinitionReference helper is used to generate $ref pointers to shared definitions, following a consistent pattern for schema composition.
  • Draft-04 compliance: The schema targets JSON Schema draft-04 ($schema: 'http://json-schema.org/draft-04/schema#') with additionalProperties: false at the root level to enforce strict property validation.

Files

  • src/schemas/10-0137/schema.js

Notes for reviewer

  • Please ensure you have incremented the version in package.json
  • Please add backend-review-group as a reviewer
  • The middle name field uses a union type (['string', 'null']) to explicitly allow null values — confirm this aligns with how the frontend and backend handle optional name components.
  • additionalProperties: false is set at the root level; verify that all expected top-level properties are explicitly declared to avoid unintended validation failures.
  • The artifact summary is truncated at 1000 characters — please review the full address definition and any remaining definitions (e.g., phone, date, healthcare agent fields) to confirm completeness and correctness before merging.
  • Confirm that all $ref targets used via buildDefinitionReference are fully defined within the definitions block.

Pull Requests to update the schema in related repositories

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

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