简体   繁体   中英

How to seed schemas in Gentics Mesh

I'm working with a team of developers, and we need to be able to stand-up a Mesh instance with all the predefined schemas on anyone's laptop.

I'd like to be able to create schemas if they don't exist, based on a collection of JSON files.

I've started a Gentics Mesh plugin that will look for the schema files, then add them via the MeshRestClient.

Is that a good approach?

I'm following the HelloWorld example here to get started -
https://github.com/gentics/mesh-plugin-examples/blob/master/hello-world-plugin/

So I built a "mesh-seeding-plugin", and it worked as expected.

It uses a config file to get the list of json schemas to load up, then when the plugin initializes, it created the schemas if they don't exist.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM