datev: rewrite adapter against official OpenAPI specs#247
Merged
Conversation
Previous adapter was inferred from third-party docs and was wrong on
every load-bearing field. Replaced with values extracted directly from
DATEV's official OpenAPI specs at developer.datev.de/mediator/apis.
Adapter changes (packages/backend/src/adapters/de/datev.json):
- Auth URLs: login.datev.de/openid/authorize + api.datev.de/token
(was login.datev.de/connect/{authorize,token} — non-existent paths).
- Scopes: datev:accounting:clients accounting:clients:read accounting:documents
(was openid offline_access accounting:documents:read/write — wrong namespacing).
- X-DATEV-Client-Id: auto-injected on every call via connector.headers
(was missing — required by every DATEV endpoint per spec).
- Tools: 6 read tools wired to real endpoints across accounting-clients v2
and accounting-documents v2. Dropped two invented tools that don't exist
on the API (datev_list_documents, datev_get_document — the documents
product is upload-only). Added datev_get_duo_version and the documents
product's own client listing.
- Upload tools (POST/PUT/stapled) intentionally excluded: require binary
multipart, REST engine still serializes form-data with String(v).
Docs (content/guides/{en,de,it}/datev-to-mcp.mdx): rewritten to match
the corrected adapter + document sandbox switching procedure and the
DATEV partner / production-approval requirement.
All 2209 catalog assertions pass.
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
The DATEV connector was inferred from third-party docs and was wrong on every load-bearing field (auth URLs, scopes, missing required header, two non-existent tools). This PR replaces it with values extracted directly from the official DATEV OpenAPI specs at
developer.datev.de/mediator/apis.Adapter (
packages/backend/src/adapters/de/datev.json)authorizationUrllogin.datev.de/connect/authorize(404)login.datev.de/openid/authorizetokenUrllogin.datev.de/connect/token(404)api.datev.de/tokenopenid offline_access accounting:documents:read accounting:documents:writedatev:accounting:clients accounting:clients:read accounting:documentsX-DATEV-Client-Idconnector.headers(required on every endpoint per spec)accounting-clients v2+accounting-documents v2Upload tools (
POST/PUT /clients/{id}/documents{,/stapled}) intentionally excluded — they need binary multipart, but the REST engine still serializes form-data field values viaString(v). Tracked as future work.Docs (
content/guides/{en,de,it}/datev-to-mcp.mdx)Rewritten to match the corrected adapter. Now covers:
platform-sandbox)POST /api/connectors/:id/oauth/authorizelist_clientstools exist (master list vs DUO-subscribed subset)Test plan
npm test --testPathPatterns=catalog.spec— 2209/2209 passnode scripts/validate-adapters.mjs— 173/173 validnode scripts/regenerate-catalog.mjs— no diff (catalog in sync)