Repository navigation
fix: core resource spec drift (evaluation, workflow, credential, data-table, project, variable, folder) - #33
Merged
Merged
Conversation
The public API types test-case executionId as a nullable integer, but the client decoded it into *string, so any numeric id failed with an UnmarshalTypeError. Decode into json.Number, which also accepts the numeric strings older instances sent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- create accepts description; it was filtered out and reported as dropped,
also losing it on 'workflow copy'
- parentFolderId may be null on write (null = move to the project root)
- settings set to "DEFAULT" (read-only marker) are dropped and reported
as settings.NAME; a null settings is sent as {} instead of failing
validation
- read-only node createdAt/updatedAt are stripped and reported
- workflow list --include-parent-folder adds a FOLDER column and keeps
parentFolder in JSON
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The API adds reason, versionId and workflowReviewRequestId to the 403 a republishing update answers and to the 409 a blocked publish answers; the error decoder dropped them. APIError now keeps them, update names the draft it saved and the review that blocked republication, and publish/copy name the review instead of guessing between a review and a webhook conflict. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Create now accepts description (at most 512 characters) and a caller-chosen id (1-16 of [a-zA-Z0-9_-]), validated locally; update accepts description, where null or blank clears it. Reads keep description (absent vs null preserved) and the usageScope delete returns. Unknown response fields are still discarded rather than kept in an Extra map, so an unexpected secret-bearing field cannot reach output. Adds n8n.Nullable for write fields where null differs from omission. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- column type json is gone from the contract: refuse it locally with a message pointing at string, for table and column creation - table list --sort-by is a closed enum (name|createdAt|updatedAt|size x asc|desc); row sort keeps the columnName:asc|desc shape check - column names (create, add, rename, row filters) must match ^[a-zA-Z][a-zA-Z0-9_]*$ and be at most 63 characters Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Project gains icon, description, customTelemetryTags, creatorId, timestamps, and the role/scopes create returns, plus Extra for unknown fields; nullable fields keep absent vs null. VariableProject and folder homeProject share it. - project create sends --id, --description, --icon TYPE:VALUE, --icon-color and --telemetry-tag KEY=VALUE; CreateProject takes a CreateProjectRequest. Name (255), ID (36), description (512) validated. - variable key/value/projectId limits validated locally (create key may not start with a digit; update allows it). Update help no longer claims omitting --project-id moves the variable to global scope: the contract does not say. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Folder names are at most 128 characters; parentFolderId on create and transferToFolderId on delete at most 36. The contract now documents parentFolderId "0" on update as moving the folder to the project root, so the help no longer says that is impossible. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
5 tasks done
5 tasks done
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.
Spec drift fixes for core resources against n8n Public API 1.1.1 (branch 08 of the spec-drift plan). Each item is its own commit, so the PR can be split (1–2 fix vs 3–6 drift) if review stalls.
Changes
evaluation case listfailed to decode any numericexecutionId(spec: nullable integer; client had*string). Nowjson.Number, which also accepts numeric strings from older instances.description(was filtered and reported as dropped; also lost onworkflow copy)parentFolderId: nullis sent (null = move to project root)"DEFAULT"marker are dropped and reported assettings.NAME; nullsettingsis sent as{}instead of failing validationcreatedAt/updatedAtstripped and reportedworkflow list --include-parent-folder(FOLDER column,parentFolderkept in JSON; stderr note when the instance ignores the parameter)APIErrorkeepsreason,versionId,workflowReviewRequestId; update 403 names the saved draft, update/publish/copy 409 name the blocking review instead of guessing review vs webhook conflict (toucheserrors.go, after fix(cli): report license denials separately from missing scopes #26)description(≤512) and customid(1–16,[a-zA-Z0-9_-]); update acceptsdescription(null/blank clears); reads keepdescriptionandusageScope. NoExtramap on purpose: unknown fields stay discarded so an unexpected secret-bearing field cannot reach output.jsoncolumn type refused locally ("use string"); table--sort-byvalidated against the closed enum; column names (create, add, rename, filters) validated against^[a-zA-Z][a-zA-Z0-9_]*$, ≤63.Projectkeeps icon, description, customTelemetryTags, creatorId, timestamps, create's role/scopes, plusExtra(shared byVariableProjectand folderhomeProject).project creategains--id,--description,--icon TYPE:VALUE,--icon-color,--telemetry-tag KEY=VALUE. Variable key/value/projectId limits validated (create key may not start with a digit; update may). Update help no longer claims omitting--project-idmoves to global scope (spec is silent; no--globaladded).parentFolderId(create) /transferToFolderId≤36; help documents--parent-folder-id 0= move to project root.New helpers:
internal/n8n/nullable.go(Nullable[T]withomitzerofor null-vs-omitted fields),internal/n8n/extra.go(unknown-field preservation).API changes:
Client.CreateProjectnow takesCreateProjectRequest;n8n.DataTableCreateColumnTypesremoved (integration test updated).Spec-derived vs live-verified
workflow list --include-parent-folder— target ignores the parameter (predates it), hence the stderr note; workflowgetshape (noparentFolderId, noDEFAULTsettings seen); data-table IDs are 16-char alphanumeric."0"= root.Skipped deliberately: data-table ID pattern validation (target agrees, but heavy test churn for little gain);
fileId/hasHeaders/csvColumnNameon table create (fileIdunusable with an API key).Test plan
make docs && make checkgo test -shuffle=on -count=1 ./internal/n8n ./internal/cli ./internal/coveragewithopenapi.upstream.ymlpresentDEFAULTsettings, nullparentFolderId), credential (description/id), project read fields🤖 Generated with Claude Code