Definition Wide Policy: globalSettings

One definition per workspace may carry a globalSettings block instead of a configurationFileMode. It constrains what every other definition in the workspace. It also restricts or allows configuration features in the workspace.

{
    $definitionSpecVersion: "1.0",
    definitionName: "ProjectPolicy",
    definitionVersion: "1.0",
    title: "Workspace policy",
    description: "Restricts the configuration file modes and file types the definitions of this workspace may use.",
    globalSettings: {
        supportedConfigurationFileModes: [
            "SingleFile",
            "MultipleFilesEntitiesMergeable",
            "MultipleFilesEntitiesMergeableWithPriority"
        ],
        supportedConfigurationFileTypes: [
            "UserConfig",
            "UserConfigPriorityHigh"
        ],
        refs: {
            // Both reference forms stay allowed, listing only one would reject the other.
            allowedRefTypes: [
                "AbsPath",
                "Id"
            ],
            unresolvedTargetSeverity: "Error"
        }
    }
}
  • supportedConfigurationFileModes restricts which modes other definitions in the workspace may use.

  • supportedConfigurationFileTypes restricts the allowed $fileType values. It requires MultipleFilesEntitiesMergeableWithPriority among the supported modes and must always include UserConfig.

  • refs.allowedRefTypes restricts the reference forms configurations may write, AbsPath ("/Path/Entity") and Id ("id:Something").

  • refs.unresolvedTargetSeverity is the severity of a reference to a missing target, Error (the default), Warning, or Info. It does not affect a fragment $path, which stays an error when it resolves to nothing.

  • numberUnitInStrings: false forbids unit strings such as "2 MHz" and decimal numbers in int strings such as "2.0".

  • floatStrings: false any string on a float. It requires numberUnitInStrings: false, because a unit string on a float is a float string.

    • Switch them off when the configuration files are read by loaders that parse no units, such as generated code.

Use it when you own an integration platform and want to constrain what the definitions of contributing components may ask of configuration authors. A definition delivered into such a workspace can become invalid without being changed, so a policy is a decision for the whole integration, not for one component.