Implementation of T351232: Community configuration 2.0: Consider generating JSONSchema from PHP classes rather than committing them directly:
Let's create a concept of a SchemaBuilder, which will be able to convert a PHP class into a schema (as of now, a JSONSchema specifically). This schema can then be passed to the validation library (in our case, JsonSchema\Validator), or used in places like the configuration editor or reader (to get the allowlist).