Repository navigation
fix: correct generic customer creation contract - #319
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Both OpenAPI schemas still allow invalid foreign addresses by dropping the required non-Mex three-character country constraints, leaving active correctness issues.
2 open issues
What changed in this PR
This pull request updates the bilingual OpenAPI contract for generic RFC customer creation, allowing Mexican addresses to omit, null, or use an empty postal code while documenting fiscal regime and invoice-use rules. The current schema changes also broaden foreign-country and shared invoice-use validation beyond the generic contract.
Changes:
- Updated Spanish and English generic customer schemas for optional postal codes.
- Added fiscal regime
616and default invoice useS01validation cases. - Extended OpenAPI validation and generated TypeScript fixtures.
- Preserved review findings concerning lost foreign-country constraints and unintended nullable values in shared schemas.
| File | Description |
|---|---|
website/test/openapi-types.fixture.txt |
Adds generated TypeScript fixture coverage for the updated generic customer inputs. |
website/scripts/check-openapi.mjs |
Adds validation cases for postal codes, fiscal regimes, and invoice uses. |
website/openapi_v2.yaml |
Updates the Spanish generic customer contract and address validation rules. |
website/openapi_v2.en.yaml |
Mirrors the generic customer contract changes in English. |
Review effort: Lite
raul-facturapi
approved these changes
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Creating a customer with a generic RFC accepts an address without a postal code, but the documented input currently requires one when the country is Mexico. The contract now accepts an omitted, null, or empty postal code and describes the permitted fiscal regime and default invoice use.
The Spanish and English specifications and generated type fixtures agree. OpenAPI checks pass for both locales.