Skip to content

fix: restrict form layout field types to the API contract - #584

Draft
owenshen0907 wants to merge 1 commit into
kintone:mainfrom
owenshen0907:fix/form-layout-field-types
Draft

owenshen0907 wants to merge 1 commit into
kintone:mainfrom
owenshen0907:fix/form-layout-field-types

Conversation

@owenshen0907

Copy link
Copy Markdown

Why

Fixes #552. Form layout validation currently accepts GROUP, SUBTABLE, STATUS, STATUS_ASSIGNEE, and CATEGORY as fields inside a row. Invalid layouts reach kintone and produce an opaque CB_VA01 error.

What

Restrict the shared field schema to the 26 types documented for Update Form Layout and Get Form Layout. Top-level group and subtable layouts remain supported.

Regressions cover the documented types, invalid types in nested layouts, group-content stripping, and the update input/get output schemas.

How to test

  • The new focused test file has 11 failures against the original implementation and passes all 38 tests after the fix.
  • pnpm test --run: 826 tests pass.
  • pnpm typecheck, pnpm lint, pnpm build, pnpm check:mcpb, and pnpm license:analyze pass.
  • Tested with Node.js 24.16.0 and the repository-pinned pnpm 10.34.5; dependencies were installed from the frozen lockfile with lifecycle scripts disabled.
  • Live kintone E2E tests were not run because they require an account and test app credentials. Docker builds were not run.

Checklist

  • Updated documentation if it is required (no user documentation change needed).
  • Added tests if it is required.
  • Passed pnpm lint and pnpm test on the root directory.

AI assistance was used for this contribution.

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.

[Bug] Form layout fieldTypeSchema allows 5 types invalid for layout[].fields[], causing opaque CB_VA01 errors

1 participant