bible-technology / scripture-burrito

Scripture Burrito Schema & Docs 🌯
http://docs.burrito.bible/
MIT License
21 stars 14 forks source link

Default and derived variants in schema #132

Closed mvahowe closed 4 years ago

mvahowe commented 4 years ago

This PR refactors the schema to implement one approach to supporting multiple "shapes" of schema, specifically for default/derived variants. The next step would be to use a similar approach in the type section to support multiple flavorTypes and flavors.

The top-level schema is a oneOf, which combines two root-level objects from which the details have been moved to separate files. This reduces duplication while also providing a very explicit and easy to edit answer to "what does the top level look like?"

The variant field has been moved to the meta section, since whichever section it lives in needs to be duplicated. I expect the default and derived meta schemas to diverge significantly anyway.

mvahowe commented 4 years ago

@rdb and I agreed to proceed with this schema strategy for now, and to consider refactoring once we have the basic functionality in place.