Conversation
javorosas
force-pushed
the
docs/sdk-generation-contract-audit
branch
from
September 29, 2026 23:47
68546f2 to
c8a449b
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Certificate nullability remains incomplete, draft stamp types reject null, and webhook operation IDs are not validated.
Review effort: Balanced
Findings: 5
Open (5)
What changed in this PR
Aligns bilingual OpenAPI contracts with the public API and adds automated contract validation.
Changes:
- Corrects schemas, webhooks, pagination, nullability, and invoice variants.
- Adds OpenAPI structural and TypeScript contract checks.
- Adds CI and repository guidance for API documentation changes.
| File | Description |
|---|---|
AGENTS.md |
Adds documentation and contract guidelines. |
.github/workflows/openapi.yml |
Runs OpenAPI checks in CI. |
website/openapi_v2.yaml |
Updates the Spanish API contract. |
website/openapi_v2.en.yaml |
Updates the English API contract. |
website/scripts/check-openapi.mjs |
Validates both specifications. |
website/test/openapi-types.fixture.txt |
Adds representative generated-type checks. |
website/package.json |
Adds the OpenAPI test command and dependencies. |
website/pnpm-lock.yaml |
Locks new dependencies. |
website/tsconfig.json |
Excludes generated directories from type checking. |
Files not reviewed (1)
- website/pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Sep 30, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Moderate OpenAPI contract inconsistencies and an incomplete nullable-schema validator remain unresolved.
Review effort: Lite
Findings: 4
Open (4)
Resolved since last review (5)
Files not reviewed (1)
- website/pnpm-lock.yaml: Generated file
This branch has not been deployed
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.


Summary
Align the Spanish and English OpenAPI 3.1 specifications with the public API contract.
webhooksfield.const Facturapi = require('facturapi'), and normalize the TypeScript label.Scope
These changes update documentation and contract checks. They do not change API behavior. The checks cover schema structure and representative examples; they do not establish exhaustive coverage of every accepted request and response.
This PR consolidates and supersedes #301 and #302, keeping the response-schema and installation-example corrections together.
Release coordination
The direct CommonJS constructor example corresponds to the support introduced in FacturAPI/facturapi-node#121. Merge these documentation changes once that SDK release is available on npm.
Validation
pnpm install --frozen-lockfilepnpm test:openapi: local references, unique operation IDs, required path parameters, OpenAPI 3.1 nullability, structural parity between languages, and representative TypeScript examples.pnpm buildpnpm typecheckgit diff --check