Skip to content

docs: require versioned stamp metadata on stamped invoices - #318

Merged
javorosas merged 2 commits into
mainfrom
docs/required-stamped-invoice-metadata
Oct 30, 2026
Merged

javorosas merged 2 commits into
mainfrom
docs/required-stamped-invoice-metadata

Conversation

@javorosas

Copy link
Copy Markdown
Member

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread website/openapi_v2.en.yaml Resolved
Comment thread website/openapi_v2.yaml Resolved
@javorosas
javorosas merged commit f2c678b into main Oct 30, 2026
2 checks passed
@javorosas
javorosas deleted the docs/required-stamped-invoice-metadata branch October 30, 2026 15:13
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.

2 participants