chore: add content platform cms schemas - CP-860 #3071
+7,675
−2
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.
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.jsoncfile. 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.
It also adds a base.jsonc exclusive for Faststore (it must not be shared with the Developer).
The content CLI (CMS) can combine the files, generate an output, and send it to the Schema Registry.
The Faststore is the base schema for all Merchants. 🚀
How to test it?
Install the Content plugin and check the available commands
Migrate the sections from hCMS to the new CMS:
Migrate the content-types from hCMS to the new CMS:
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.jsoncto the output. Merchants will automatically use the base from the Schema Registry.Finally, send the output schema to the Schema Registry 🚀
IMPORTANT: This command is equivalent to the hCMS cms-sync function.
References
Schema Registry for CMS (content platform)
Content Plugin CLI
Split command
Documentation
@Mariana-Caetanoto review and update (Or submit a doc request)