Skip to content

[Tech-debt] Move director mailingAddress validation from legal-api to schema (directors.json) #34022

Closed

Description

@mruff-aeq

Tech-debt cleanup. Director mailingAddress presence is currently validated in legal-api Python code and only for corporate entity types. Move this enforcement to the schema level (business-schemas/directors.json) so it applies to all entity types and validation lives in one place.

Background

  • Schema (business-schemas → src/registry_schemas/schemas/directors.json): the director definition lists mailingAddress as a property but it is not in the required array (only officer, deliveryAddress, appointmentDate, cessationDate are). So the schema accepts a director with no mailing address.
  • legal-api (lear → legal-api/src/legal_api/services/filings/validations/change_of_directors.py, validate_directors_addresses): a missing mailingAddress object is only rejected when business.legal_type in Business.CORPS.
  • Net effect: non-corporate entities can omit mailingAddress entirely and pass backend validation, even though the frontend requires it for everyone.

This is a consistency gap, not a live bug — no rush.

Proposed change

  1. Add "mailingAddress" to the required array in directors.json (business-schemas).
  2. Remove the now-redundant CORPS-only mailingAddress object check from change_of_directors.py (lear).
  3. Bump the registry_schemas version + tag, and refresh the legal-api pin to pick up the new schema.

Notes

Activity

  1. added
    Entities Team
    on Jun 30, 2026
  2. changed the title [-]Move director mailingAddress validation from legal-api to schema (directors.json)[/-] [+][Tech-debt] Move director mailingAddress validation from legal-api to schema (directors.json)[/+] on Jun 30, 2026
  3. self-assigned this
    on Jul 8, 2026
  4. mruff-aeq commented on Jul 9, 2026

    @mruff-aeq
    CollaboratorAuthor

    Closing — tech-debt cleanup blocked. Can't move mailingAddress to schema (shared director def, no legalType to scope by; would reject existing coop directors). Not worth pursuing for minimal tech debt clean up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Entities Teamtechdebt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions