Skip to content

Conversation

@mateuspontes
Copy link
Contributor

@mateuspontes mateuspontes commented Oct 16, 2025

What's the purpose of this pull request?

This PR adds the schema definitions for components and content types that will be used by CMS (Content Platform).

A big change introduced is regarding how we're allowing schema definitions for components to be broken into multiple json | jsonc files.
A second significant change is the base.jsonc file. It's a special file used only by the Consumer. In this case, Faststore is a Consumer and must maintain this base file. This must not be sent to the clients.

This PR replaces the #2742

How it works?

This PR splits the sections.json and content-types.json file into many components.

  • packages/core/cms/faststore/components/.*jsonc
  • packages/core/cms/faststore/content-types/.*jsonc

It also adds a base.jsonc exclusive for Faststore (it must not be shared with the Developer).

  • packages/core/cms/faststore/base.jsonc

The content CLI (CMS) can combine the files, generate an output, and send it to the Schema Registry.

  • packages/core/cms/faststore/schema.json (final schema output)

The Faststore is the base schema for all Merchants. 🚀

How to test it?

Install the Content plugin and check the available commands

vtex plugins install @vtex/cli-plugin-content

Migrate the sections from hCMS to the new CMS:

vtex content split-components -i cms/faststore/sections.json -o cms/faststore/components

Migrate the content-types from hCMS to the new CMS:

vtex content split-content-types -i packages/core/cms/faststore/content-types.json -s packages/core/cms/faststore/sections.json -o packages/core/cms/faststore/content-types

When you are ready, you can generate the final output:
IMPORTANT: The Faststore Core Team is the only one that needs to add the -l base.jsonc to the output. Merchants will automatically use the base from the Schema Registry.

vtex content generate-schema packages/core/cms/faststore/components packages/core/cms/faststore/content-types -l packages/core/cms/faststore/base.jsonc -o packages/core/cms/faststore/schema.json

Finally, send the output schema to the Schema Registry 🚀
IMPORTANT: This command is equivalent to the hCMS cms-sync function.

vtex content upload-schema

References

Schema Registry for CMS (content platform)
Content Plugin CLI
Split command

Documentation

  • For documentation changes, ping @Mariana-Caetano to review and update (Or submit a doc request)

@mateuspontes mateuspontes self-assigned this Oct 16, 2025
@mateuspontes mateuspontes requested a review from a team as a code owner October 16, 2025 13:02
@mateuspontes mateuspontes requested review from a team, hellofanny and lucasfp13 and removed request for a team October 16, 2025 13:02
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 16, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@mateuspontes mateuspontes changed the title chore: add content platform cms schemas chore: add content platform cms schemas - CP-860 Oct 16, 2025
@mateuspontes mateuspontes force-pushed the chore/add-content-platform-cms-schemas branch from 934de69 to e8d1e67 Compare October 23, 2025 15:30
@mateuspontes mateuspontes force-pushed the chore/add-content-platform-cms-schemas branch from e8d1e67 to 902127f Compare October 23, 2025 15:43
@matheusps matheusps changed the base branch from main to dev October 27, 2025 17:28
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.

2 participants