Repository navigation
docs: require versioned stamp metadata on stamped invoices - #318
Merged
Merged
Conversation
…-invoice-metadata
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The 1.0 schemas in both OpenAPI files incorrectly accept the inherited rfc_provider_cert property, contrary to the documented shape, and must explicitly reject it.
2 open issues
What changed in this PR
Updates the version 2 invoice-stamp contracts so InvoiceStamp.version is required and rfc_provider_cert is required for TFD 1.1 while remaining optional for TFD 1.0.
Changes:
- Adds version-specific TFD 1.0 and 1.1 schema branches in both OpenAPI contracts.
- Preserves existing stamp metadata requirements and other stamp schemas.
- Strengthens the TypeScript fixture for version narrowing and certifier RFC typing.
- The 1.0 branches should explicitly reject
rfc_provider_cert, since undeclared properties are currently allowed.
| File | Summary | Review notes |
|---|---|---|
website/test/openapi-types.fixture.txt |
Verifies required stamp version metadata and the typed TFD 1.1 certifier RFC. | No blocking issue identified. |
website/openapi_v2.yaml |
Adds Spanish InvoiceStamp variants for TFD 1.0 and 1.1. |
Explicitly reject rfc_provider_cert in the 1.0 branch. |
website/openapi_v2.en.yaml |
Mirrors the versioned InvoiceStamp structure in English. |
Explicitly reject rfc_provider_cert in the 1.0 branch. |
Review effort: Lite
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.

La respuesta de una factura timbrada requiere la versión del timbre. El RFC del certificador es requerido para TFD 1.1; TFD 1.0 conserva su forma sin ese atributo. La leyenda sigue siendo opcional.
El esquema InvoiceStamp expresa ambas variantes mediante version, manteniendo los sellos, la fecha y complement_string requeridos. Los contratos en español e inglés conservan la misma estructura. No cambian las entradas para crear facturas ni el esquema general Stamp usado por otros estados.
Se reforzó el fixture de tipos existente para exigir version y comprobar que rfc_provider_cert es string al seleccionar version 1.1. Las comprobaciones OpenAPI y TypeScript del contrato pasan, sin añadir casos de prueba nuevos.