Skip to content

Improve JSON schema error messages#7782

Open
Barefoot0 wants to merge 3 commits into
mainfrom
fix/json-schema-received-object-error-message
Open

Improve JSON schema error messages#7782
Barefoot0 wants to merge 3 commits into
mainfrom
fix/json-schema-received-object-error-message

Conversation

@Barefoot0

@Barefoot0 Barefoot0 commented Jun 11, 2026

Copy link
Copy Markdown

WHY are these changes introduced?

Fixes #22951

TOML app module validation could report confusing JSON Schema errors such as Expected object, received object when a TOML array of tables was used where an object was expected.

WHAT is this pull request doing?

  • Updates JSON Schema validation error formatting to report arrays as arrayinstead of relying on JavaScript typeof output.
  • Adds a TOML-specific hint for app configuration errors when an object was expected but an array was received.
  • Adds regression tests for array/null received-type formatting and the TOML validation hint.

How to test your changes?

  • pnpm --filter @shopify/cli-kit vitest src/public/node/json-schema.test.ts
  • pnpm --filter @shopify/app vitest src/cli/services/validate.test.ts
  • Can run Shopify CLI locally with a local app module and verify validation. I followed this document to set up a local test app and used this command in your cli repo: SHOPIFY_CLI_NEVER_USE_PARTNERS_API=1 SHOPIFY_SERVICE_ENV=local pnpm shopify app dev --path [path to test app]

Post-release steps

None.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Copy link
Copy Markdown
Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 11, 2026
@github-actions github-actions Bot added Area: @shopify/cli @shopify/cli package issues and removed no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. labels Jun 11, 2026
Apply changes from code browser
@Barefoot0 Barefoot0 marked this pull request as ready for review June 11, 2026 02:03
@Barefoot0 Barefoot0 requested review from a team as code owners June 11, 2026 02:03
@Barefoot0 Barefoot0 self-assigned this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant