Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate address endpoint violates the partial_address model validation #10

Open
nmusco opened this issue Dec 18, 2020 · 0 comments
Open

Comments

@nmusco
Copy link

nmusco commented Dec 18, 2020

When calling the address validation endpoint it will sometimes respond with address_line2 of the matched address value set to an empty string instead of a null value. The partial_address model requires the address_line2 value be null or have a length > 0. This is causing issues with auto generated client libraries.

Rule:

        address_line2:
          type: string
          minLength: 1
          nullable: true
          example: Unit 408
          description: >
            The second line of the street address.  For some addresses, this
            line may not be needed.

Response:

[
  {
    "status": "verified",
    "original_address": {
      "name": "REDACTED",
      "phone": null,
      "company_name": null,
      "address_line1": "REDACTED",
      "address_line2": null,
      "address_line3": null,
      "city_locality": "REDACTED",
      "state_province": "REDACTED",
      "postal_code": "REDACTED",
      "country_code": "US",
      "address_residential_indicator": "unknown"
    },
    "matched_address": {
      "name": "REDACTED",
      "phone": null,
      "company_name": null,
      "address_line1": "REDACTED",
      "address_line2": "",
      "address_line3": null,
      "city_locality": "REDACTED",
      "state_province": "REDACTED",
      "postal_code": "REDACTED",
      "country_code": "US",
      "address_residential_indicator": "yes"
    },
    "messages": []
  }
]
@nmusco nmusco changed the title validate address endpoint violates the partial_address model validation Validate address endpoint violates the partial_address model validation Dec 18, 2020
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

No branches or pull requests

1 participant