Skip to main content

SchemaDefaultsSource

SchemaDefaultsSource is responsible for discovering all the default values attached to schema field definitions, and generating a synthetic field path assignment for each. It uses the lowest priority sequence number specified in ConfigurationSource.

There are two implications from this source; one cautionary, and one potentially inspirational:

  1. This source (or one very much like it) is required to be registered to ensure correct schema operation! Without it, field defaults will break.
  2. It's notable that a field definition attribute (default, in this case) is not actually used internally by the schema at all (!) but can be used as a hint to generate synthetic assignments. You can do this too; in fact, you are encouraged to decorate schema fields with whatever additional attributes you'd like, and leverage them downstream in a custom ConfigurationSource!

In any case, this is otherwise a fairly boring source, and you should just treat it as a system-level requirement.