Skip to content

Add COMPANY_LEGAL_NAME to UserInfoFieldName enum#253

Closed
AaryamanBhute wants to merge 1 commit into
mainfrom
add-company-legal-name-userinfofield
Closed

Add COMPANY_LEGAL_NAME to UserInfoFieldName enum#253
AaryamanBhute wants to merge 1 commit into
mainfrom
add-company-legal-name-userinfofield

Conversation

@AaryamanBhute
Copy link
Copy Markdown
Contributor

What

Adds COMPANY_LEGAL_NAME to the UserInfoFieldName enum (last entry, after BUSINESS_TYPE).

Regenerated the bundled openapi.yaml and mintlify/openapi.yaml via npm run build:openapi. No version bump and no generated/ regen, matching the convention for prior single-value additions (#248 "Add new business type field", #232 "Add identifier to userinfofieldname").

Why

companyLegalName is a valid UMA counterparty data field used for B2B payment support (Tazapay). It already exists in the UMA protocol enum (UmaCounterpartyDataField.COMPANY_LEGAL_NAME = "companyLegalName") and in the Grid API's CustomerInfoFieldName enum, but was never added here.

As a result, when a receiver VASP marks companyLegalName as a mandatory counterparty field, sparkcore's UMAaaS VASP (convert_requested_counterparty_data) cannot map it to a UserInfoFieldName and raises a 501 UNRECOGNIZED_MANDATORY_COUNTERPARTY_DATA_KEY, which pages on-call on gen_create_quote / /grid/rc/quotes. COMPANY_LEGAL_NAME is currently the only field the Grid/UMA enums recognize that UMAaaS does not.

A matching fix was applied to the vendored copy of this spec in lightsparkdev/webdev (umaaas-api/), but that copy is regenerated from this repo via update_schema.sh. Without this upstream change, the next regen silently reverts the fix and the alert returns.

Related

  • sparkcore-side change:

🤖 Generated with Claude Code

companyLegalName is a valid UMA counterparty data field
(UmaCounterpartyDataField.COMPANY_LEGAL_NAME = "companyLegalName") used for
B2B payment support, and already exists in the Grid API's CustomerInfoFieldName
enum, but was missing from UMAaaS's UserInfoFieldName. When a receiver VASP
marks companyLegalName as mandatory, sparkcore's UMAaaS VASP
(convert_requested_counterparty_data) cannot map it and raises a 501
UNRECOGNIZED_MANDATORY_COUNTERPARTY_DATA_KEY, which pages on-call.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 28, 2026

Greptile Summary

Adds COMPANY_LEGAL_NAME as a new enum value to UserInfoFieldName across the source schema and both bundled OpenAPI specs, fixing a live 501 error that fires when a receiver VASP marks companyLegalName as a mandatory counterparty field.

  • openapi/components/schemas/users/UserInfoFieldName.yaml: single-line enum addition in the source file, appended after BUSINESS_TYPE in UPPER_SNAKE_CASE following the established convention.
  • openapi.yaml / mintlify/openapi.yaml: both bundled specs regenerated via npm run build:openapi, producing identical, consistent diffs.

Confidence Score: 5/5

Safe to merge — the change is a pure additive enum extension with no breaking surface.

The source YAML, the bundled openapi.yaml, and the mintlify bundle are all updated consistently with an identical single-line addition. The new value follows the existing naming convention and aligns with the UMA protocol enum. No logic, validation, or generated client code is touched in this PR.

No files require special attention; the only thing worth a quick human glance is confirming the downstream webdev vendored copy will pick up this upstream change on the next schema regen.

Important Files Changed

Filename Overview
openapi/components/schemas/users/UserInfoFieldName.yaml Adds COMPANY_LEGAL_NAME to the UserInfoFieldName enum — minimal, correct, follows existing UPPER_SNAKE_CASE convention.
openapi.yaml Bundled OpenAPI spec regenerated via npm run build:openapi; diff is identical to the source schema change.
mintlify/openapi.yaml Mintlify-specific bundled spec regenerated; same single-line addition, consistent with openapi.yaml.

Sequence Diagram

sequenceDiagram
    participant ReceiverVASP as Receiver VASP
    participant UMAaaS as UMAaaS (sparkcore)
    participant Schema as UserInfoFieldName enum

    ReceiverVASP->>UMAaaS: Quote request with companyLegalName (mandatory)
    UMAaaS->>Schema: convert_requested_counterparty_data lookup
    Note over Schema: Before: COMPANY_LEGAL_NAME missing<br/>After: COMPANY_LEGAL_NAME present
    alt Before this PR
        Schema-->>UMAaaS: Key not found
        UMAaaS-->>ReceiverVASP: 501 UNRECOGNIZED_MANDATORY_COUNTERPARTY_DATA_KEY
    else After this PR
        Schema-->>UMAaaS: Resolved to COMPANY_LEGAL_NAME
        UMAaaS-->>ReceiverVASP: Quote created successfully
    end
Loading

Reviews (1): Last reviewed commit: "Add COMPANY_LEGAL_NAME to UserInfoFieldN..." | Re-trigger Greptile

@AaryamanBhute
Copy link
Copy Markdown
Contributor Author

Superseding this. Rather than keep adding fields to the deprecated umaaas-api UserInfoFieldName enum, we're decoupling the Grid quote/lookup path from this enum entirely so it uses Grid's own CustomerInfoFieldName (which already includes COMPANY_LEGAL_NAME). That fixes the 501 paging without recurring maintenance here.

See lightsparkdev/webdev#28003.

@AaryamanBhute AaryamanBhute deleted the add-company-legal-name-userinfofield branch May 28, 2026 22:41
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