Repository navigation
fix: correct DDL and webhook endpoint metadata (v2.0.1) - #8
Merged
Merged
Conversation
DDL endpoints (FileMaker_Tables / FileMaker_Indexes) used OData
key-parentheses format that FMS rejects with error -1010; switched to
slash-separated paths. createIndex now takes the table in the URL and
{ indexName: <fieldName> } in the body; deleteIndex uses
FileMaker_Indexes/{table}/{field}.
Webhook endpoints had wrong methods and URL patterns: reads (GetAll,
Get) are GET, the id goes in the URL as a function argument
(Webhook.Get(1)), the delete endpoint is Webhook.Delete (not Remove),
and Webhook.Invoke requires a { rowIDs: [...] } body.
Mirrored the fixes across @fms-odata/spec-ts, fms-odata-spec-py, the
JSON capabilities manifest, and docs/09 + docs/10. Added
WebhookInvokeParams and WebhookCreateResult types, a webhookID field on
WebhookData, and an optional id parameter on webhookPath(). Bumped both
packages and the manifest to 2.0.1.
Verified against live FileMaker Server 26.0.1 and the official Claris
OData guide. TS typecheck/build clean; Python pytest 191 passed.
The JSON manifest was missing contentType for 11 endpoints that require JSON request bodies, while the TS and Python packages correctly declared them. Added application/json to createRecord, updateRecord, updateRecordRef, runScript, runScriptById, updateContainerBase64, createTable, addFields, createIndex, createWebhook, and invokeWebhook. batch already had multipart/mixed. The manifest now matches the TS source of truth in src/endpoints.ts exactly.
The previous contentType commit claimed the manifest matched the TS source exactly, but it omitted alsoMethods for 4 endpoints. Added ["PUT"] to createRecord, updateRecord, updateContainerBase64, and addFields to match src/endpoints.ts. The manifest now matches the TS source of truth for both contentType and alsoMethods. Note: getSystemTable exists in the TS FM_ENDPOINTS array but is absent from the manifest endpoints block; this is a pre-existing inconsistency on develop (not introduced here) and is left for a separate fix.
3 of 6 tasks
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
FileMaker_Tables/FileMaker_IndexesaddFields, deleteTable, deleteField, createIndex, deleteIndex now use slash-separated paths (FileMaker_Tables/{tableName}) instead of OData key-parentheses (FileMaker_Tables('{tableName}')), which FMS rejects with error-1010.createIndexnow takes the table in the URL and{ indexName: <fieldName> }in the body;deleteIndexusesFileMaker_Indexes/{table}/{field}.Webhook.GetAll,Webhook.Get) areGET; the webhook id goes in the URL as an OData function argument (Webhook.Get(1)); the delete endpoint isWebhook.Delete(notWebhook.Remove);Webhook.Invokerequires a{ rowIDs: [...] }body.WebhookInvokeParamsandWebhookCreateResult, awebhookIDfield onWebhookData(FMS's actual primary key), and an optionalidparameter onwebhookPath().WebhookOperationnow usesDeleteinstead ofRemove.@fms-odata/spec-ts,fms-odata-spec-py, the JSON capabilities manifest, anddocs/09-webhooks.md+docs/10-schema-modification.md.2.0.1(patch — bug fixes to existing metadata).Verified against live FileMaker Server 26.0.1 and the official Claris OData guide (https://help.claris.com/en/odata-guide/content/webhook-options.html), cross-referenced with the reference implementation at https://github.com/fsans/fms-odata-webhooks.
Test plan
npm run typecheckandnpm run buildinpackages/fms-odata-spec-ts— cleanpytestinpackages/fms-odata-spec-py— 191 passed (was 173; +18 new assertions covering corrected paths/methods,WebhookInvokeParams,WebhookCreateResult,webhookIDfield, id-in-pathwebhookPath)schema/fms-odata-capabilities.jsonvalidated as well-formed JSON