Skip to content

Sync OpenAPI spec to v2-20260710 and fix docs drift#58

Merged
sandervanhooft merged 4 commits into
mainfrom
claude/moneybird-openapi-sync-a40435
Jul 11, 2026
Merged

Sync OpenAPI spec to v2-20260710 and fix docs drift#58
sandervanhooft merged 4 commits into
mainfrom
claude/moneybird-openapi-sync-a40435

Conversation

@sandervanhooft

@sandervanhooft sandervanhooft commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pull latest official Moneybird OpenAPI spec (v2-20260710-57729b61b9, saved as openapi-specs/openapi-2026-07-12.yml) and refresh OPENAPI-BACKLOG.md against it
  • Fix documentation drift where doc pages referenced methods that don't exist in the code
  • Expand CLAUDE.md with docs-site sync rules and the spec sync procedure
  • CI hardening: tests on PRs, PHPStan, docs build check (see below)

Spec changes (v2-20251223 → v2-20260710)

  • Task Lists: entirely new resource family (task_lists, task_list_groups, task_list_tasks, task_list_templates) — added to backlog, not implemented
  • External Sales Invoices synchronization is now official — our existing implementation is now spec-compliant (previously flagged "not in spec")
  • New: reports creditors_aging/debtors_aging, asset reinvestment reserve endpoints, time entry resume/stop, webhook activate/deactivate, workflows GET by id
  • Re-verified all remaining "not in spec" backlog claims still hold

Docs fixes

  • contacts: replace nonexistent createUsageCharge()/getUsageCharges() with actual createAdditionalCharge()/getAdditionalCharges() (moved the already-corrected stray docs/contacts.md into place)
  • external sales invoice attachments/payments: replace nonexistent $client->externalSalesInvoiceAttachments()/externalSalesInvoicePayments() accessors with $client->externalSalesInvoices()->attachments()/->payments(), and fix sub-endpoint example method names
  • Document previously undocumented methods: synchronization() on estimates, external sales invoices, financial mutations, financial statements, general (journal) documents; all() on estimates; sales invoice reminder template getters

CI changes

  • run-tests.yml: now triggers on pull_request + pushes to main, path filter removed — previously PRs could merge with no test status at all (fork PRs got zero checks)
  • phpstan.yml (new): composer analyse on PRs and main. PHPStan level 5; the 65 pre-existing errors (mostly the intentional new static() DTO pattern and Saloon v3/v4 method_exists compat checks) are pinned in phpstan-baseline.neon, so CI fails only on new errors
  • docs-build.yml (new): build-only Astro check on PRs touching docs/** — catches docs build breakage pre-merge (previously only discovered when the Pages deploy failed on main)
  • composer.json: adds phpstan/phpstan (dev) and the analyse script
  • CLAUDE.md: fixed stale commands (composer format, PHPUnit not Pest) and documented the CI setup

⚠️ This PR now touches .github/workflows/, so it must be merged by a user with workflow scope (the GitHub UI merge button works fine).

Follow-up for repo settings (admin-only): mark Tests and PHPStan as required checks on main once this lands.

- Add openapi-specs/openapi-2026-07-12.yml (v2-20260710-57729b61b9)
- Update OPENAPI-BACKLOG.md with spec changes: new Task Lists resource
  family, aging reports, asset reinvestment reserve endpoints, time
  entry resume/stop, webhook activate/deactivate; external sales
  invoices synchronization is now official
- Fix docs drift: contacts usage-charge naming (createAdditionalCharge/
  getAdditionalCharges), nonexistent client accessors in external sales
  invoice attachment/payment examples, wrong sub-endpoint method names
- Document previously undocumented methods: synchronization() on six
  resources, estimates all(), sales invoice reminder template getters
- Expand CLAUDE.md: docs site sync rules, spec sync procedure,
  sub-endpoint access pattern, specs/ vs openapi-specs/ distinction
- run-tests.yml: trigger on pull_request and pushes to main, drop the
  path filter so the Tests status is always present (path-filtered
  workflows can't be used as required checks)
- Add phpstan.yml: composer analyse on PRs and main. PHPStan level 5
  with the 65 pre-existing errors pinned in phpstan-baseline.neon so
  CI only fails on new errors
- Add docs-build.yml: build-only Astro check on PRs touching docs/**
  (deploy remains main-only)
- composer.json: add phpstan/phpstan dev dependency and analyse script
- CLAUDE.md: fix stale commands (composer format, PHPUnit not Pest),
  document the CI setup
- actions/checkout v6 -> v7 in all workflows (v7 blocks pwn-request
  patterns by default in pull_request_target workflows; our only
  pull_request_target workflow, dependabot-auto-merge, never checks
  out PR code)
- Add composer-audit.yml: composer audit with latest Composer against
  a prefer-stable resolution, on main pushes, PRs, and a weekly cron.
  Prefer-stable is required: prefer-lowest resolves Saloon v3, whose
  known advisories are accepted for backwards compatibility
- Document both in CLAUDE.md CI section
- Extend the test matrix from PHP 8.2/8.3 to 8.2-8.5, matching the
  versions currently supported by the PHP project
- Run PHPStan and composer audit on PHP 8.5
- composer.json "php": "^8.2" already matches the supported set
  exactly; no constraint change needed
- Document the PHP support policy in CLAUDE.md (drop 8.2 from matrix
  and constraint after its 2026-12-31 EOL)
@sandervanhooft sandervanhooft merged commit c7fb26d into main Jul 11, 2026
22 checks passed
@sandervanhooft sandervanhooft deleted the claude/moneybird-openapi-sync-a40435 branch July 11, 2026 23:32
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.

1 participant